<DIV> </DIV>
<DIV> </DIV>
<DIV>Hi every:</DIV>
<DIV> </DIV>
<DIV>When I read a vtk image file,an error was gotten:</DIV>
<DIV>ExceptionObject caught !</DIV>
<DIV>itk::ExceptionObject (011DF248)<BR>Location: "unknown"<BR>File: D:\ITK\ITK1\Code\IO\itkVTKImageIO.cxx<BR>Line: 193<BR>Description: itk::ERROR: VTKImageIO(01735440): Not structured points, can't read</DIV>
<DIV> </DIV>
<DIV>Here is my programme:</DIV>
<DIV><BR>#if defined(_MSC_VER)<BR>#pragma warning ( disable : 4786 )<BR>#endif</DIV>
<DIV>#ifdef __BORLANDC__<BR>#define ITK_LEAN_AND_MEAN<BR>#endif<BR>#include "itkImageFileReader.h"<BR>#include "itkImageFileWriter.h"<BR>#include "itkVTKImageIO.h"<BR>#include "itkImage.h"<BR>const unsigned int myDimension = 3;<BR>typedef itk::Image<float, myDimension> FloatImageType;<BR>int main()<BR>{<BR> itk::VTKImageIO::Pointer vtkIO;<BR> vtkIO = itk::VTKImageIO::New();<BR> itk::ImageFileReader<FloatImageType>::Pointer reader;<BR> reader = itk::ImageFileReader<FloatImageType>::New();<BR> reader->SetImageIO(vtkIO);<BR> reader->SetFileName("sphere.vtk");<BR> try <BR> { <BR> reader->Update(); <BR> } <BR> catch( itk::ExceptionObject & err ) <BR> { <BR> std::cerr << "ExceptionObject caught !" << std::endl; <BR> std::cerr << err << std::endl; <BR> return EXIT_FAILURE;<BR> } <BR> itk::VTKImageIO::Pointer vtkIO2;<BR> vtkIO2 = itk::VTKImageIO::New();</DIV>
<DIV> itk::ImageFileWriter<FloatImageType>::Pointer writer;<BR> writer = itk::ImageFileWriter<FloatImageType>::New();<BR> writer->SetInput(reader->GetOutput());<BR> writer->SetFileName("sphere2.vtk");<BR> writer->SetImageIO(vtkIO2);<BR> try <BR> { <BR> writer->Update(); <BR> } <BR> catch( itk::ExceptionObject & err ) <BR> { <BR> std::cerr << "ExceptionObject caught !" << std::endl; <BR> std::cerr << err << std::endl; <BR> return EXIT_FAILURE;<BR> } <BR> return EXIT_SUCCESS;<BR>}</DIV>
<DIV> </DIV>
<DIV>Thank you for your help!</DIV><br><!-- footer --><br><hr>
<a style="font-size:14px;line-height:15px; color:#000; text-decoration:none" href="http://www.126.com/" target="_blank"><span style="text-decoration:underline; color:blue">Ô¶ÀëÀ¬»øÓʼþ£¿Ãâ·Ñ°ïÄã¹ýÂË98£¥µÄÀ¬»øÓʼþ£¡</span><span style="font-family:Tahoma; text-decoration:underline; color:blue">>></span> </a>