[vtkusers] vtkTIFFReader Examples + Data

Dominik Szczerba domi at vision.ee.ethz.ch
Mon Dec 19 04:17:23 EST 2005


i would suggest you convert the tiffs to another format and try e.g. 
PNGReader. I used to have problems with tiffs. another debugging would 
be to try to load your data into the latest paraview to see if the 
problem is there too (uses VTK CVS version)
Dominik

Corrie Allen wrote:
> 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
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> This is the private VTK discussion list. 
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers

-- 
Dominik Szczerba, Dr.
Computer Vision Lab CH-8092 Zurich
http://www.vision.ee.ethz.ch/~domi



More information about the vtkusers mailing list