[vtkusers] vtkImageWriter issue...
Ale
notinmyhead at gmail.com
Mon May 21 06:54:00 EDT 2012
Hello,
I'd like to write an vtkImageData into a file (in order to check if a correctly made the import from ITK). I use VTK 5.10 under OSX and QT. I resort to this code (where vtkVolume is a vtkSmartPointer<vtkImageData> correctly instatiated):
vtkSmartPointer<vtkImageWriter> writer = vtkSmartPointer<vtkImageWriter>::New();
writer->SetInput(vtkVolume);
writer->SetFileName ("/mydir/filename.tif");
writer->Write();
When the program is run I get the program exit unexpected with this (portion) error:
Thread 0 Crashed: Dispatch queue: com.apple.main-thread
0 libvtkCommon.5.10.dylib 0x0132a6f0 vtkObjectFactory::IsA(char const*) + 48 (vtkObjectFactory.h:113)
1 libvtkFiltering.5.10.dylib 0x0177a88c vtkImageAlgorithm::SetInput(int, vtkDataObject*) + 44 (vtkImageAlgorithm.cxx:410)
2 libvtkFiltering.5.10.dylib 0x0177a900 vtkImageAlgorithm::SetInput(vtkDataObject*) + 32 (vtkImageAlgorithm.cxx:403)
Thanks,
Ale
More information about the vtkusers
mailing list