[vtkusers] Re: Re: Help needed using segmented data

Goodwin Lawlor goodwin.lawlor at ucd.ie
Tue Jul 27 11:41:58 EDT 2004


> 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.

If you've got your segmentation done, VTK is all you need.

>
> 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?

The pgm files contain the pixel data in binary format which can't be read
with
an (ascii) text reader. The bit of text you can read is the image header.

> 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.

You were almost there with the segmented16.tcl, except your data was in an
unusual format.
I've uploaded an updated tcl script that works with your data bmp.1 ...
bmp.9 here:
http://www.bioengineering-research.com/vtk/segmented.tcl

The data spacing you had looks wrong (if you were reconstructing some tube
like thing). I tried
"1 1 30" instead.

Good luck

Goodwin






More information about the vtkusers mailing list