[vtkusers] Re: tiff and jpeg readers with volume rendering- use vtkImageLuminance!!!

Dr. Dan White dan at chalkie.org.uk
Wed Oct 9 11:55:26 EDT 2002


Dear John,

and all those trying to use vtk  jpg/tiff/bmp reader
for volume rendering

The answer to the garbled imaging was indeed
vtkImageLuminance

Now I can see a cell shaped cell!!!!

I used it in my python script as follows

# Data reader
reader1 = vtkJPEGReader ()
reader1.SetFilePrefix(filename)
reader1.SetFilePattern("%s%03i.jpg")
reader1.SetDataExtent(0,101,0,118,001,020)
reader1.SetDataSpacing(1,1,2.5)
reader1.SetDataByteOrderToBigEndian

reader = vtkImageLuminance ()
reader.SetInput (reader1.GetOutput())


On Tuesday, October 8, 2002, at 04:24 , anast.jm at pg.com wrote:

>
>
> Dan, Even if its gray scale it might still have three component color
> (r=g=b=gray) so oyu can try extracting the luminance. I work in tcl 
> so here's a
> fragment if you can use it
>
> # Simple volume rendering example.
> vtkBMPReader reader1
>     reader1 SetFilePrefix "P:/VolumeData/2uCT/test/dik"
>     reader1 SetDataSpacing 0.44 0.44 0.88
>     reader1 SetDataExtent 0 1023 0 1023 1 200
>     reader1 SetDataVOI 100 925 100 925 1 200
>
> vtkImageLuminance reader
>     reader SetInput [reader1 GetOutput]
>
>
>
>
>  Internet Mail Message
>  Received from host:      posti1.jyu.fi
>  [130.234.4.32]
>
>
>
> From: "Dr. Dan White" <dan at chalkie.org.uk> on 10/08/2002 10:44 AM ZE3
>
>       "Dr. Dan White"           To:   vtkusers at public.kitware.com
>  <dan at chalkie.org.uk>           Cc:   John Anast-JM/PGI at PGI
>                         Subject:      tiff and jpeg readers with volume
>                              rendering
>   10/08/2002 03:44 AM
>
>
>
>
>
> Hi John, and all,
>
> Thanks for replying!
> Actually the images are grayscale 8 bit, so do I still need the 
> luminescence
> filter before I can do volume rendering properly?
> If so can you suggest code? Does it go in just after the reader code?
>
> cheers
>
> Dan
>
>> Message: 11
>> Subject: Re: [vtkusers] vtkJPEGReader and vtkTIFFReader
>> To: vtkusers at public.kitware.com
>> From: anast.jm at pg.com
>> Date: Mon, 7 Oct 2002 14:23:57 -0400
>
>
>> I suspect these are color images and you might want to try to 
>> extract the
>> luminance (vtkImageLuminance) before rendering....john
>
>
>
> dan at chalkie.org.uk
> http://www.chalkie.org.uk
>
> Daniel James White PhD.
> Cell Biology
> Department of Biological and Environmental Science
> University of Jyv‰skyl‰
> FIN-40351
> Jyv‰skyl‰
> Finland
>
>
> +358 (0)14 260 4183 (office)
>
>
>
dan at chalkie.org.uk
http://www.chalkie.org.uk

Daniel James White PhD.
Cell Biology
Department of Biological and Environmental Science
University of Jyväskylä
FIN-40351
Jyväskylä
Finland

+358 (0)14 260 4183 (office)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 2891 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20021009/bf1a4d18/attachment.bin>


More information about the vtkusers mailing list