[vtkusers] vtkImageColorViewer and vtkImageMapToWindowLevelColors2

alba garin albagarin1986 at hotmail.com
Fri Mar 25 05:34:31 EDT 2011


Good morning,

 




 I am doing a program to read a diffusion
weighted nrrd file, read it, get the tensors with itk
(itk::DiffusionTensor3DReconstructionImageFilter), and getting the main
direction of each vector I create a RGB image. I use a itkToVtkImageFilter to convert
it to vtkImageData. This image data is the input of a vtkImageColorViewer, and
I visualize it with vtk and qt. I visualize 3 ortogonal views (axial, coronal
and sagital) and I can move through the slices and almost all the slices are
properly visualized.

 

 The problem is when in some slices are some
parts that there are big regions of one predominant color; in this case, only
the boundaries of this region are colored in that predominant color, and the
whole region in another color. So, the visualized color is not the correct. It
looks like the color get highly saturated.

 I do not configure anything in the viewer
related to the colors, coz the vtkImageColorViewer with the
vtkImageMapToWindowLevelColors2 handles everything for me. I mean I set the
input of the viewer and render it, nothing else. 




 In this link you can see the difference.

 http://alba-stuff.blogspot.com/2011/03/error.html

 

 In this image appears my visualization on the
left side and what should be displayed in the right hand side obtained from the
rgb itk image (be aware that the Left is on the Right and the anterior is
flipped for the posterior). The problem is after converting the itk rgb image,
because the reference image (the one for the right) is this itk image.


Do you know any class of vtk to view rgb color images? i tried with vtkImageViewer, vtkImageViewer2, but i cannot handle the 3 components (RGB) of each voxel... 

 Hope I explained it properly...





Thanks,




 Alba




 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110325/67e85f4f/attachment.htm>


More information about the vtkusers mailing list