<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7638.1">
<TITLE>Can vtkImageMapToWindowLevelColors only output greyscale images???</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>Hi,<BR>
<BR>
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?)<BR>
<BR>
Am I not setting up my lookup table properly? Not sure what the problem is.<BR>
<BR>
Thanks<BR>
<BR>
John E<BR>
<BR>
<BR>
-----Original Message-----<BR>
From: vtkusers-bounces@vtk.org on behalf of Miguel Angel Rodriguez Florido<BR>
Sent: Mon 3/16/2009 9:13 AM<BR>
To: Mathieu Malaterre<BR>
Cc: vtkusers@vtk.org<BR>
Subject: Re: [vtkusers] vtkDICOMImageReader and an extrange error,..<BR>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Hi Mathieu,<BR>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; You were right. The dicom file was compressed. I have used the gdcmconv<BR>
cmd to uncompress it.<BR>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Thank you very much for your useful information.<BR>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Best.<BR>
<BR>
Mathieu Malaterre wrote:<BR>
&gt; Did you read the documentation ?<BR>
&gt; <A HREF="http://www.vtk.org/doc/nightly/html/classvtkDICOMImageReader.html">http://www.vtk.org/doc/nightly/html/classvtkDICOMImageReader.html</A><BR>
&gt;<BR>
&gt; If you can read it with Slicer, this means this is a proper DICOM file<BR>
&gt; but vtkDICOMImageReader only handles:<BR>
&gt;<BR>
&gt; ...<BR>
&gt; Warning:<BR>
&gt;&nbsp;&nbsp;&nbsp;&nbsp; This reader might eventually handle ACR-NEMA file (predecessor of<BR>
&gt; the DICOM format for medical images). This reader does not handle<BR>
&gt; encapsulated format, only plain raw file are handled. This reader also<BR>
&gt; does not handle multi-frames DICOM datasets.<BR>
&gt; ...<BR>
&gt;<BR>
&gt; Have a look at vtkGDCMImageReader which will handle you file (I would<BR>
&gt; bet this is a compressed data).<BR>
&gt;<BR>
&gt; <A HREF="http://gdcm.sourceforge.net/html/classvtkGDCMImageReader.html">http://gdcm.sourceforge.net/html/classvtkGDCMImageReader.html</A><BR>
&gt;<BR>
&gt; ref:<BR>
&gt; <A HREF="http://apps.sourceforge.net/mediawiki/gdcm/index.php?title=GDCM_Release_2.0">http://apps.sourceforge.net/mediawiki/gdcm/index.php?title=GDCM_Release_2.0</A><BR>
&gt;<BR>
&gt; If you cannot integrate gdcm into your project you can use gdcmconv<BR>
&gt; --raw to decompress the image and make it compatible with<BR>
&gt; vtkDICOMImageReader<BR>
&gt;<BR>
&gt; <A HREF="http://apps.sourceforge.net/mediawiki/gdcm/index.php?title=Gdcmconv">http://apps.sourceforge.net/mediawiki/gdcm/index.php?title=Gdcmconv</A><BR>
&gt;<BR>
&gt; 2cts<BR>
<BR>
<BR>
--<BR>
Miguel Angel Rodríguez Florido<BR>
Departamento de Ingeniería del Software<BR>
División de Investigación y Desarrollo Tecnológico<BR>
INSTITUTO TECNOLOGICO DE CANARIAS, S.A. - GOBIERNO DE CANARIAS<BR>
URL: www.itccanarias.org Tlfno: +34 928 727548, Fax: +34 928 727517<BR>
<BR>
--------------------------------------------------------------------------<BR>
AVISO LEGAL:<BR>
Este mensaje y los ficheros adjuntos si los hubiere, se dirigen<BR>
exclusivamente a su destinatario y puede contener información<BR>
privilegiada o confidencial. La transmisión errónea del presente mensaje<BR>
en ningún momento supone renuncia a su confidencialidad. Si no es vd. el<BR>
destinatario indicado, queda notificado de que la utilización,<BR>
divulgación y/o copia sin autorización está prohibida en virtud de la<BR>
legislación vigente. Si ha recibido este mensaje por error, le rogamos<BR>
que nos lo comunique inmediatamente por esta misma vía y proceda a su<BR>
destrucción.<BR>
<BR>
LEGAL WARNING:<BR>
This message and the files attached if there were any, are intended<BR>
exclusively for its addressee and may contain information that is<BR>
CONFIDENTIAL and protected by professional privilege. A wrong<BR>
transmission to this message don't suppose we relinquished to It's<BR>
confidential. If you are not the intended recipient you are hereby<BR>
notified that any dissemination, copy or disclosure of this<BR>
communication is strictly prohibited by law. If this message has been<BR>
received in error, please immediately notify us via e-mail and delete it.<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
</FONT>
</P>

</BODY>
</HTML>