<br> The 3D deformation field (.vtk image) I am creating has gotten written to file<br> with two different header files with the exact same code. The first time I ran<br> my code my OS was Red Hat Linux. I can read this image. I am now using Cent<br> Linux and am having a problem reading the second image (.vtk image).<br> <br> Header file that will read:<br> <br> # vtk DataFile Version 3.0<br> VTK File Generated by Insight Segmentation and Registration Toolkit (ITK)<br> BINARY<br> DATASET STRUCTURED_POINTS<br> DIMENSIONS 82 56 41<br> SPACING 3.9443597793579102e+00 4.1964287757873535e+00 3.9157774448394775e+00<br> ORIGIN 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00<br> POINT_DATA 188272<br> SCALARS scalars double 3<br> LOOKUP_TABLE default<br> <br> Header file that will not read:<br> <br> # vtk DataFile Version 3.0<br> VTK File Generated by Insight Segmentation and Registration Toolkit (ITK)<br> BINARY<br> DATASET STRUCTURED_POINTS<br> DIMENSIONS 82
56 41<br> SPACING 3.9443597793579102e+00 4.1964287757873535e+00 3.9157774448394775e+00<br> ORIGIN 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00<br> POINT_DATA 188272<br> VECTORS vectors double<br> LOOKUP_TABLE default<br> <br> Code I use to read in the deformation field (.vtk image):<br> <br> <br> typedef itk::Vector< double, 3 > VectorType;<br> typedef itk::Image< VectorType, 3 > DeformationFieldType;<br> typedef itk::ImageFileReader< DeformationFieldType > FieldReaderType;<br> typedef itk::WarpImageFilter< ImageType, ImageType, DeformationFieldType > FilterType;<br> <br> // read in deformation field<br> FieldReaderType::Pointer fieldReader = FieldReaderType::New();<br> DeformationFieldType::ConstPointer deformationField;<br> <br> fieldReader->SetFileName( deformationFieldFile ); std::endl;<br> <br> try<br> {<br>
fieldReader->Update();<br> }<br> catch( itk::ExceptionObject & excp )<br> {<br> std::cerr << "Exception thrown" << std::endl;<br> std::cerr << excp << std::endl;<br> }<br> <br> deformationField = fieldReader->GetOutput();<br> <br> <br> I am using ITK version 3.2.0. The program never finishes executing the command<br> "fieldReader->Update();". I don't get an error, it just seems as if the code<br> encounters an infinite For Loop. The code runs fine for the .vtk image with the<br> first header listed above, but I encounter the described problem for the .vtk<br> image with the second header listed above.<br> <br> Thanks,<br> <br>Matt<br><p> __________________________________________________<br>Do You Yahoo!?<br>Tired of spam? Yahoo! Mail has the best spam protection around <br>http://mail.yahoo.com