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> <<a href="mailto:anka@bic.mni.mcgill.ca">
anka@bic.mni.mcgill.ca</a>> 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> vtkImageActor * mriActor;
<br>...<br>...<br> blendedImage->AddInput( 0, img1->GetOutput());<br> blendedImage->AddInput( 0,<br>.displayWindowLevelColorsImage->GetOutput());<br> blendedImage->Update();<br> mriActor->SetInput(blendedImage->GetOutput());
<br> renderer->AddViewProp( mriActor );<br>Anka<br><br>Luca Pamparana wrote:<br><br>> Hello everyone,<br>><br>> I am unable to get the vtkImageMapToWindowLevelColors to give me an<br>> output :(<br>>
<br>> My pipeline is as follows:<br>><br>> // vtkImageData input to a reslicer<br>> this->m_slicer->SetInput(in);<br>><br>> // pass the output of the slicer to vtkImageMapToWindowLevelColors object
<br>> this->m_windowLevelMapper->SetInputConnection(this->m_slicer->GetOutputPort());<br>><br>><br>> // Pipe the output to a vtkImageBlend object<br>> this->m_blender->AddInputConnection(0,
<br>> this->m_windowLevelMapper->GetOutputPort());<br>><br>> // Pipe output to a vtkImageMapper. This mapper is tied to the Actor2D<br>> // object that is added to the renderer<br>> this->m_imageMapper->SetInput(this->m_blender->GetOutput());
<br>><br>> double * range = in->GetScalarRange();<br>> if (range)<br>> {<br>> // this calls the ciorresponding methods on the<br>> vtkImageMapToWindowLevelColors object<br>> this->SetColorWindow(range[1] - range[0]);
<br>> this->SetColorLevel(0.5 * (range[1] + range[0]));<br>> }<br>><br>> SetSlice(static_cast<int>((GetWholeZMin() + GetWholeZMax()) * 0.5));<br>><br>> My guess is that I am not setting the ColorWindow and ColorLevel on
<br>> the vtkImageMapper instance. However, I want to control the color<br>> window and color level values independently of the mapper as the<br>> vtkImageBlend will also have other inputs that I want to control the
<br>> window and level values for.<br>><br>> Any help on how I can get this to work is much appreciated.<br>><br>> Thanks,<br>> Luca<br>><br>>------------------------------------------------------------------------
<br>><br>>_______________________________________________<br>>This is the private VTK discussion list.<br>>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>>Follow this link to subscribe/unsubscribe:<br>><a href="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>><br>><br></blockquote></div><br>