<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 < inputFileVector.size(); i++)<br>    {<br>        // Read all the DICOM files in the specified directory.<br>        vtkSmartPointer<vtkDICOMImageReader> reader = vtkSmartPointer<vtkDICOMImageReader>::New();<br>        reader->SetFileName(inputFileVector.at(i).c_str());<br>        reader->Update();<br><br>        vtkSmartPointer<vtkImageData> dicomImage = vtkSmartPointer<vtkImageData>::New();<br>        dicomImage = reader->GetOutput();<br><br>        imageSet.push_back(dicomImage);<br>    }<br><br>planeSource->SetCenter(center.x, center.y, 0.0);<br>    planeSource->SetNormal(0.0, 0.0, 1.0);<br>    planeSource->Update();<br><br>vtkSmartPointer<vtkImageData> image = imageSet.at((int)getSliceNum());<br><br>    texture->SetInput(image);<br>    texturePlane->SetInputConnection(planeSource->GetOutputPort());<br>    mapper->SetInputConnection(texturePlane->GetOutputPort());<br><br>    imageActor->SetMapper(mapper);<br>    imageActor->SetTexture(texture);<br><br>renderer->AddActor(imageActor);<br>renderWindow->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>