Hey Anka,<br><br>Thanks again for the reply.<br><br>The thing is that I
am using the reslicer to extract a 2D slice and just display that. All
the interpolation, orientation, which slice to extract etc. is
controlled by the reslicer. <br><br>The vtkImageActor seems to have its own corresponding methods
for these operations. I am wondering if these can coexist... Only one
way to find out, I guess! Time for try some quick hack...<br><br>Thanks,<br><span class="sg">Luca.</span><br><br><div><span class="gmail_quote">On 4/17/07, <b class="gmail_sendername">Anka Kochanowska</b> &lt;<a href="mailto:anka@bic.mni.mcgill.ca">
anka@bic.mni.mcgill.ca</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I am using vtkImageActor:<br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vtkImageActor * mriActor;
<br>...<br>...<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;blendedImage-&gt;AddInput( 0, img1-&gt;GetOutput());<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;blendedImage-&gt;AddInput( 0,<br>.displayWindowLevelColorsImage-&gt;GetOutput());<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;blendedImage-&gt;Update();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mriActor-&gt;SetInput(blendedImage-&gt;GetOutput());
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;renderer-&gt;AddViewProp( mriActor );<br>Anka<br><br>Luca Pamparana wrote:<br><br>&gt; Hello everyone,<br>&gt;<br>&gt; I am unable to get the vtkImageMapToWindowLevelColors to give me an<br>&gt; output :(<br>&gt;
<br>&gt; My pipeline is as follows:<br>&gt;<br>&gt; // vtkImageData input to a reslicer<br>&gt; this-&gt;m_slicer-&gt;SetInput(in);<br>&gt;<br>&gt; // pass the output of the slicer to vtkImageMapToWindowLevelColors object
<br>&gt; this-&gt;m_windowLevelMapper-&gt;SetInputConnection(this-&gt;m_slicer-&gt;GetOutputPort());<br>&gt;<br>&gt;<br>&gt; // Pipe the output to a vtkImageBlend object<br>&gt; this-&gt;m_blender-&gt;AddInputConnection(0,
<br>&gt; this-&gt;m_windowLevelMapper-&gt;GetOutputPort());<br>&gt;<br>&gt; // Pipe output to a vtkImageMapper. This mapper is tied to the Actor2D<br>&gt; // object that is added to the renderer<br>&gt; this-&gt;m_imageMapper-&gt;SetInput(this-&gt;m_blender-&gt;GetOutput());
<br>&gt;<br>&gt; double * range = in-&gt;GetScalarRange();<br>&gt; if (range)<br>&gt; {<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // this calls the ciorresponding methods on the<br>&gt; vtkImageMapToWindowLevelColors object<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this-&gt;SetColorWindow(range[1] - range[0]);
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this-&gt;SetColorLevel(0.5 * (range[1] + range[0]));<br>&gt;&nbsp;&nbsp;}<br>&gt;<br>&gt; SetSlice(static_cast&lt;int&gt;((GetWholeZMin() + GetWholeZMax()) * 0.5));<br>&gt;<br>&gt; My guess is that I am not setting the ColorWindow and ColorLevel on
<br>&gt; the vtkImageMapper instance. However, I want to control the color<br>&gt; window and color level values independently of the mapper as the<br>&gt; vtkImageBlend will also have other inputs that I want to control the
<br>&gt; window and level values for.<br>&gt;<br>&gt; Any help on how I can get this to work is much appreciated.<br>&gt;<br>&gt; Thanks,<br>&gt; Luca<br>&gt;<br>&gt;------------------------------------------------------------------------
<br>&gt;<br>&gt;_______________________________________________<br>&gt;This is the private VTK discussion list.<br>&gt;Please keep messages on-topic. Check the FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ
</a><br>&gt;Follow this link to subscribe/unsubscribe:<br>&gt;<a href="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>&gt;<br>&gt;<br></blockquote></div><br>