[vtkusers] vtkTIFFReader Examples + Data

Corrie Allen lonewolfbiosci at verizon.net
Sun Dec 18 18:41:06 EST 2005


Hi Folks,
I'm new to VTK and have successfully run many of the examples shipped  
with VTK.  However, when I get adventurous and try to modify the  
code, things just don't work out as well.  I'm trying to import a  
stack of TIFF files, build isocontours, then output the contours as  
an STL file.  To start with, I tried just inserting the following  
code into the Medical2.cxx example in place of the V16 code.

vtkTIFFReader *tifread = vtkTIFFReader::New();
     tifread->SetDataByteOrderToLittleEndian();
     tifread->SetFilePrefix (argv[1]);
     tifread->SetDataOrigin (0, 0, 0);
     tifread->SetDataSpacing (3.2, 3.2, 1.5);
     tifread->Update();

vtkContourFilter *boneExtractor = vtkContourFilter::New();
     boneExtractor->SetInput((vtkDataSet *) tifread->GetOutput());

Added the includes and deletes as appropriate.


   When I launched the built application directed at a short stack of  
10 tiffs, it just makes the render window and then just runs.  It  
doesn't go back to my unix prompt.  No error messages, nothing.  Is  
there an example anywhere of a functional program that loads TIFF  
files and generates some sort of feedback.  It would be great if such  
an example had an associated Tiff stack known to work with it.  I'm  
running a Mac G4, OSX 10.4, 1.5 gBytes of RAM and VTK 4.4.  The side  
of my head is getting flat from banging it against the wall - any  
help will be appreciated.
Corrie


Corrie Allen, Ph.D.
Lone Wolf Bioscience

lonewolfbiosci at verizon.net


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20051218/77adaf2c/attachment.htm>


More information about the vtkusers mailing list