[vtkusers] Re: Help needed using segmented data
Vidya Raghavan
vidya_raghavan at hotmail.com
Tue Jul 27 09:11:29 EDT 2004
Hi Goodwin,
Thanks for replying. Basically I need to be able to read in the segmented
data and model it (like the frog example) using the VTK pipeline process.
So, does ITK now suppport this or should I be using VTK itself. I'm a little
confused here.
The frog example reads in data like:
P5
# pgm file written by the visualization toolkit
500 470
255
I don't see any information about segmented pixels at all here. So how does
the program read it and render it?
All I need is a nice approach to be able to read in my slices and to be able
to render a model of that data. Should I be looking at other examples? I
just thought that the frog examples seemed to be in line with what I want.
Please clarify.
Thanks!
>From: "Goodwin Lawlor" To: vtkusers at public.kitware.com Subject: [vtkusers]
>Re: Help needed using segmented data Date: Tue, 27 Jul 2004 04:48:17 +0100
>
>Vidya,
>
>The problem is with your data... its in ascii format, with characters
>(numbers) delimited by spaces. You could use the data mask in the reader to
>cut out the spaces and the use vtkImageShiftScale to move "0" down from 48
>in the ascii table. Something like this:
>
>vtkImageReader reader reader SetFilePrefex c:/data/bmp reader
>SetDataExtent 0 255 0 255 1 9 #even though data is uchar, read in two
>bytes reader SetDataScalarTypeToShort #chop the space out
>reader SetDataMask 0x00FF reader SetDataByteOrderToLittleEndian
>
>vtkImageShiftScale shift shift SetInput [reader GetOutput] shift
>SetShift -48
>
>... ...
>
>Or you could just use vtkBMPReader on the original images.
>
>
>Segemented8.tcl, Segemented16.tcl and the frog example (all around vtk 2.0,
>I think) used to be good examples but were axed- perhaps they were moved
>over to itk...
>
>
>hth
>
>Goodwin
>
>"Vidya Raghavan" wrote in message
>news:BAY2-F8D4F8jvj5SxW3000156d7 at hotmail.com... > Dear VTK users, > > I had
>posted this question earlier, but didn't get any response yet. So, I'm >
>reposting it. Hope someone can help me. > > Basically, I am trying to model
>segmented data in VTK, based on the tutorial > provided in: > >
>http://www.crd.ge.com/~lorensen/seg12/, where the input data is described
>as > "a set of slices that have the same resolution as the original data,
>but > grayscale values have been replaced with integer segmentation
>labels.". > > There were some errors in the scripts as they used an older
>verison of VTK. > I now have these scripts working for VTK 4.2 and there
>are at > http://www.cs.northwestern.edu/~vidya/VTK/scripts > > Now I am
>trying to use my own segmented data with the above scripts, where > they
>represent 256 X 256 segmented data, with each pixel represented by an >
>integer. > > The segmented data I have used is at: >
>http://www.cs.northwestern.edu/~vidya/VTK/data > > The script I have
>written to describe these parameters is region1.tcl > > When I run
>region1.tcl I should get a vtk file region1.vtk. Instead it is > empty and
>no polygons are generated. I am really trying to understand what > is
>wrong, but since I'm new to VTK I still cannot figure it out. > > Could
>someone please help? > > Thanks. > >
>_________________________________________________________________ >
>Marriage? http://www.bharatmatrimony.com/cgi-bin/bmclicks1.cgi?74 Join >
>BharatMatrimony.com for free. > >
>_______________________________________________ > This is the private VTK
>discussion list. > Please keep messages on-topic. Check the FAQ at:
>
> > Follow this link to subscribe/unsubscribe: >
>http://www.vtk.org/mailman/listinfo/vtkusers >
>
>
>
>_______________________________________________ This is the private VTK
>discussion list. Please keep messages on-topic. Check the FAQ at: Follow
>this link to subscribe/unsubscribe:
>http://www.vtk.org/mailman/listinfo/vtkusers
_________________________________________________________________
Beat the summer heat. http://go.msnserver.com/IN/53030.asp Get the new
International Gillette Series Range!!
More information about the vtkusers
mailing list