<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
Dear all,<br><br>I'm having some trouble displaying DICOM images read in with vtkDICOMImageReader in grayscale. I was able to display it in grayscale using imageViewer2 as per the example, but not with this texture, mapper, actor, renderer setup. My pipeline looks like this:<br><br>/////<br><br>for (int i = 0; i &lt; inputFileVector.size(); i++)<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; // Read all the DICOM files in the specified directory.<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; vtkSmartPointer&lt;vtkDICOMImageReader&gt; reader = vtkSmartPointer&lt;vtkDICOMImageReader&gt;::New();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; reader-&gt;SetFileName(inputFileVector.at(i).c_str());<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; reader-&gt;Update();<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; vtkSmartPointer&lt;vtkImageData&gt; dicomImage = vtkSmartPointer&lt;vtkImageData&gt;::New();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; dicomImage = reader-&gt;GetOutput();<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; imageSet.push_back(dicomImage);<br>&nbsp;&nbsp;&nbsp; }<br><br>planeSource-&gt;SetCenter(center.x, center.y, 0.0);<br>&nbsp;&nbsp;&nbsp; planeSource-&gt;SetNormal(0.0, 0.0, 1.0);<br>&nbsp;&nbsp;&nbsp; planeSource-&gt;Update();<br><br>vtkSmartPointer&lt;vtkImageData&gt; image = imageSet.at((int)getSliceNum());<br><br>&nbsp;&nbsp;&nbsp; texture-&gt;SetInput(image);<br>&nbsp;&nbsp;&nbsp; texturePlane-&gt;SetInputConnection(planeSource-&gt;GetOutputPort());<br>&nbsp;&nbsp;&nbsp; mapper-&gt;SetInputConnection(texturePlane-&gt;GetOutputPort());<br><br>&nbsp;&nbsp;&nbsp; imageActor-&gt;SetMapper(mapper);<br>&nbsp;&nbsp;&nbsp; imageActor-&gt;SetTexture(texture);<br><br>renderer-&gt;AddActor(imageActor);<br>renderWindow-&gt;Render();<br><br>/////<br><br>The result is that the DICOM image is being displayed in RGB colours. From my searches online, it sounds like I need to apply a lookup table that will convert RGB into luminance, but is that the only way? If imageviewer2 can display it in grayscale without a lookup table, then I would imagine this could do so as well. Thank you in advance for your attention.<br><br>Regards,<br>Alexis Cheng<br>Computer Science<br>Johns Hopkins University<br>                                               </div></body>
</html>