<div dir="ltr"><div><div>hello all,<br><br></div>I am receiving a "largest possible region does not fully contain requested paste..." error on execution of my program.. I'm fairly certain I have botched my pipeline flow.. can anyone point out the error for me?<br>
<br>******************************************<br> reader->SetFileName( argv[1] );<br><br> reader->Update();<br><br> // Obtaining an input displacement field<br> DisplacementFieldType::Pointer field = reader->GetOutput(); <br>
<br><br> DisplacementFieldType::RegionType region = field->GetLargestPossibleRegion();<br><br> itk::ImageRegionIteratorWithIndex< DisplacementFieldType > it( field, region );<br><br> filter->SetInput( reader->GetOutput() );<br>
<br> filter->SetSubsamplingFactor( 16 );<br><br> filter->Update();<br><br> try<br> {<br> filter->UpdateLargestPossibleRegion();<br> }<br> catch( itk::ExceptionObject & excp )<br> {<br> std::cerr << "Exception thrown " << std::endl;<br>
std::cerr << excp << std::endl;<br> }<br><br> // Write an image for regression testing<br> typedef itk::ImageFileWriter< DisplacementFieldType > WriterType;<br><br> WriterType::Pointer writer = WriterType::New();<br>
<br> writer->SetInput (filter->GetOutput() );<br> writer->SetFileName( argv[2] );<br><br> try<br> {<br> writer->Update();<br> }<br> catch( itk::ExceptionObject & excp )<br> {<br> std::cerr << "Exception thrown by writer" << std::endl;<br>
std::cerr << excp << std::endl;<br> return EXIT_FAILURE;<br> }<br>****************************<br><br></div>Many thanks!<br clear="all"><div><div><div><br>-- <br>Tim Bhatnagar<br>PhD Candidate<br>Orthopaedic Injury Biomechanics Group<br>
Department of Mechanical Engineering<br>University of British Columbia<br><br>Rm 5000 - 818 West 10th Ave.<br>Vancouver, BC<br>Canada<br>V5Z 1M9<br><br>Ph: (604) 675-8845<br>Fax: (604) 675-8820<br>Web: <a href="http://oibg.mech.ubc.ca" target="_blank">oibg.mech.ubc.ca</a><br>
</div></div></div></div>