<div dir="ltr">Hi All,<div>I have some two DICOM data sets that I would like to blend to display together. I am using vtkImageReslice to get slices from each data set and tried to blend them in vtkImageBlend. The rough code is as following:</div><div><pre style="color:rgb(0,0,0);font-family:menlo;font-size:9pt"><span style="color:rgb(148,85,141)">self</span>.reslice_1 = vtk.vtkImageReslice()<br><span style="color:rgb(148,85,141)">self</span>.reslice_1.SetInputConnection(img_reader_1.GetOutputPort())<br><span style="color:rgb(148,85,141)">self</span>.reslice_1.SetOutputDimensionality(<span style="color:rgb(0,0,255)">2</span>)<br><span style="color:rgb(148,85,141)">self</span>.reslice_1.SetResliceAxes(image_basics_1.axes[orientation])<br><span style="color:rgb(148,85,141)">self</span>.reslice_1.SetInterpolationModeToLinear()<br><span style="color:rgb(148,85,141)">self</span>.reslice_1.SetOutputSpacing(img_reader_1.GetDataSpacing())<br><br><span style="color:rgb(148,85,141)">self</span>.reslice_2 = vtk.vtkImageReslice()<br><span style="color:rgb(148,85,141)">self</span>.reslice_2.SetInputConnection(img_reader_2.GetOutputPort())<br><span style="color:rgb(148,85,141)">self</span>.reslice_2.SetOutputDimensionality(<span style="color:rgb(0,0,255)">2</span>)<br><span style="color:rgb(148,85,141)">self</span>.reslice_2.SetResliceAxes(image_basics_2.axes[orientation])<br><span style="color:rgb(148,85,141)">self</span>.reslice_2.SetInterpolationModeToLinear()<br><span style="color:rgb(148,85,141)">self</span>.reslice_2.SetOutputSpacing(img_reader_2.GetDataSpacing())</pre></div><div><pre style="color:rgb(0,0,0);font-family:menlo;font-size:9pt"><span style="color:rgb(148,85,141)">self</span>.blend = vtk.vtkImageBlend()<br><span style="color:rgb(148,85,141)">self</span>.blend.AddInputConnection(<span style="color:rgb(148,85,141)">self</span>.reslice_1.GetOutputPort())<br><span style="color:rgb(148,85,141)">self</span>.blend.AddInputConnection(<span style="color:rgb(148,85,141)">self</span>.reslice_2.GetOutputPort())<br><span style="color:rgb(148,85,141)">self</span>.blend.SetOpacity(<span style="color:rgb(0,0,255)">0</span>, <span style="color:rgb(0,0,255)">.5</span>)<br><span style="color:rgb(148,85,141)">self</span>.blend.SetOpacity(<span style="color:rgb(0,0,255)">1</span>, <span style="color:rgb(0,0,255)">.5</span>)</pre></div><div>But for some reasons, all I got is a blank. What did I miss?</div><div><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div>Many thanks.<br><br><br></div>Bill<br></div></div></div>
</div></div>