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

Mathieu Malaterre mathieu.malaterre at gmail.com
Mon Mar 16 12:17:06 EDT 2009


See:

http://www.vtk.org/pipermail/vtk-developers/2007-August/004687.html

You can find a 'color' version of vtkImageMapToWindowLevelColors
within gdcm itself: vtkImageMapToWindowLevelColors2

Ref:
http://gdcm.sf.net



On Mon, Mar 16, 2009 at 2:41 PM, John Eke <johne at annidis.com> wrote:
> Hi,
>
> 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.
>
> Thanks
>
> 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.
>
>         Best.
>
> 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
> INSTITUTO TECNOLOGICO DE CANARIAS, S.A. - GOBIERNO DE CANARIAS
> URL: www.itccanarias.org Tlfno: +34 928 727548, Fax: +34 928 727517
>
> --------------------------------------------------------------------------
> AVISO LEGAL:
> 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
> destrucción.
>
> LEGAL WARNING:
> 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.
>
>
>
>
>
>
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>



-- 
Mathieu



More information about the vtkusers mailing list