<div dir="ltr"><div><div><div><div><div><div><div><div>Hello vtkusers, <br><br></div>I'm
trying to visualize the RT dose on top of a CT image. To do so, I first
find the iso-dose lines using vktContourFilter which works just fine. <br></div>Then
I want to add colors to those iso-lines depending on their value. So I
creat a lookup table and then ( I think ) I have to map my image through
this lookup table using vtkImageMapToColors. <br></div><div>Afterwards, I have to use vtkImageBlend with two mappers as inputs ( one for iso-lines and one for the CT image). <br><br></div><div>So it goes something like this: <br><br>vtkSmartPointer<vtkImageMapToColors> DoseColorMapper = vtkSmartPointer<vtkImageMapToColors>::New();<br>DoseColorMapper->SetInputData(contourFilter->GetOutput());<br>DoseColorMapper->SetLookupTable(l_lut);<br>DoseColorMapper->SetOutputFormatToRGB();<br></div><div>/// ... the same for the CT image<br>vtkSmartPointer<vtkImageBlend> imgBlender = vtkSmartPointer<vtkImageBlend>::New();<br> imgBlender->SetOpacity(0, 0.5);<br> imgBlender->SetOpacity(1, 0.5);<br> imgBlender->AddInputConnection(CtColorMapper->GetOutputPort());<br> imgBlender->AddInputConnection(DoseColorMapper->GetOutputPort());<br><br><br></div><div><br></div>The problem is, when I trying doing passing the output of the ContourFilter to the mapper I get this error : <br>vtkCompositeDataPipeline
(037DBD78): Input for connection index 0 on input port index 0 for
algorithm vtkImageMapToColors(037DBC50) is of type vtkPolyData, but a
vtkImageData is required.<br><br></div>So my question is, do I have to convert the output of ContourFilter from polydata to imagedata ? <br></div>or is there another way around this by giving the mapper an input of type polydata ? <br><br></div>any help would be really appreciated. <br><br></div>Thanks in advance<br><br></div>Iyas</div>