<div>I did this when I first started using vtk, it may be really inefficient but it worked back then. In my input datasets which were greyscale, I marked my special pixels with extremely high scalar values, like 65,000. Then I created a vtkColorTransferFunction, and mapped my normal greyscales in a smooth RGB ramp from 0,0,0 to 255,255,255. I added a last entry in the color transfer function that anything above 65,000 would be RGB 255,255,0 (yellow). In this way I got a pretty decent mapping without changing too much in my original setup. If I had other types of 'special' pixels I would mark those as 65,100, then add another mapping color in the transfer function. Just an option.
</div>
<div> </div>
<div>Mark</div>
<div><br> </div>
<div><span class="gmail_quote">On 9/9/05, <b class="gmail_sendername">Aaron Cois</b> <<a href="mailto:aaron_vtk@yahoo.com">aaron_vtk@yahoo.com</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">I apologize, this question is halfway between an ITK<br>question and a VTK question. However, I believe there
<br>may be a pure VTK solution, so i've posted here first.<br><br>I've been writing software that inputs grayscale<br>images via ITK and displays them using<br>vtkImagePlaneWidgets, vtkImageImport, and<br>itkVTKImageExport.
<br><br>I've come across a need to overlay color on certain<br>pixels, marking them as having a certain status. I've<br>had a good deal of trouble trying to accomplish this,<br>and haven't been able to find any answers searching
<br>the archives. Trying to just use an image of<br>itkRBGPixels has failed, though<br><br><a href="http://www.itk.org/cgi-bin/viewcvs.cgi/Auxiliary/vtk/itkReadITKImageShowVTK.cxx?root=InsightApplications&view=markup">
http://www.itk.org/cgi-bin/viewcvs.cgi/Auxiliary/vtk/itkReadITKImageShowVTK.cxx?root=InsightApplications&view=markup</a><br><br>would imply that it could be done. I've tried using<br>vtkImageActors and have managed to output a 2D color
<br>image (with interactor crashing problems, but at least<br>it displays), but not a 3D volume.<br><br>It seems ot me there should be a simple way for me to<br>get the output of the vtkImporter (a vtkDataSet or<br>vtkImageData) and simply alter individual pixels to
<br>change them to a color rather than their grayscale<br>value. Can anyone help?<br><br> Aaron<br><br>__________________________________________________<br>Do You Yahoo!?<br>Tired of spam? Yahoo! Mail has the best spam protection around
<br><a href="http://mail.yahoo.com">http://mail.yahoo.com</a><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></blockquote></div><br>