[vtkusers] Can vtkImageMapToWindowLevelColors only output greyscale images???

John Eke johne at annidis.com
Mon Mar 16 09:41:19 EDT 2009


I am currently calculating window-level values of an image actor from user selected brightness and contrast levels. I pass these values to vtkImageMapToWindowLevelColors::SetWindow and vtkImageMapToWindowLevelColors::SetLevel methods. The brightness and contrast works, but it always outputs a greyscale image. How can I get it to do the window-level modifications and still output a color image? (Just like in vtkImageViewer but I noticed it uses vtkImageMapper which does vtkImageMapper::SetColorWindow - is there a difference?)

Am I not setting up my lookup table properly? Not sure what the problem is.


John E

-----Original Message-----
From: vtkusers-bounces at vtk.org on behalf of Miguel Angel Rodriguez Florido
Sent: Mon 3/16/2009 9:13 AM
To: Mathieu Malaterre
Cc: vtkusers at vtk.org
Subject: Re: [vtkusers] vtkDICOMImageReader and an extrange error,..
	Hi Mathieu,

	You were right. The dicom file was compressed. I have used the gdcmconv 
cmd to uncompress it.

	Thank you very much for your useful information.


Mathieu Malaterre wrote:
> Did you read the documentation ?
> http://www.vtk.org/doc/nightly/html/classvtkDICOMImageReader.html
> If you can read it with Slicer, this means this is a proper DICOM file
> but vtkDICOMImageReader only handles:
> ...
> Warning:
>     This reader might eventually handle ACR-NEMA file (predecessor of
> the DICOM format for medical images). This reader does not handle
> encapsulated format, only plain raw file are handled. This reader also
> does not handle multi-frames DICOM datasets.
> ...
> Have a look at vtkGDCMImageReader which will handle you file (I would
> bet this is a compressed data).
> http://gdcm.sourceforge.net/html/classvtkGDCMImageReader.html
> ref:
> http://apps.sourceforge.net/mediawiki/gdcm/index.php?title=GDCM_Release_2.0
> If you cannot integrate gdcm into your project you can use gdcmconv
> --raw to decompress the image and make it compatible with
> vtkDICOMImageReader
> http://apps.sourceforge.net/mediawiki/gdcm/index.php?title=Gdcmconv
> 2cts

Miguel Angel Rodríguez Florido
Departamento de Ingeniería del Software
División de Investigación y Desarrollo Tecnológico
URL: www.itccanarias.org Tlfno: +34 928 727548, Fax: +34 928 727517

Este mensaje y los ficheros adjuntos si los hubiere, se dirigen 
exclusivamente a su destinatario y puede contener información 
privilegiada o confidencial. La transmisión errónea del presente mensaje 
en ningún momento supone renuncia a su confidencialidad. Si no es vd. el 
destinatario indicado, queda notificado de que la utilización, 
divulgación y/o copia sin autorización está prohibida en virtud de la 
legislación vigente. Si ha recibido este mensaje por error, le rogamos 
que nos lo comunique inmediatamente por esta misma vía y proceda a su 

This message and the files attached if there were any, are intended 
exclusively for its addressee and may contain information that is 
CONFIDENTIAL and protected by professional privilege. A wrong 
transmission to this message don't suppose we relinquished to It's 
confidential. If you are not the intended recipient you are hereby 
notified that any dissemination, copy or disclosure of this 
communication is strictly prohibited by law. If this message has been 
received in error, please immediately notify us via e-mail and delete it.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090316/4e9ce5f2/attachment.htm>

More information about the vtkusers mailing list