Hello everyone,<br><br>I am unable to get the vtkImageMapToWindowLevelColors to give me an 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>// Pipe the output to a vtkImageBlend object
<br>this->m_blender->AddInputConnection(0, 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 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 the vtkImageMapper instance. However, I want to control the color window and color level values independently of the mapper as the vtkImageBlend will also have other inputs that I want to control the 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>