<div dir="ltr"><div><div><div><div>On the readers, try replacing<br></div>Update()<br></div>with<br></div>UpdateLargestPossibleRegion()<br><br></div>or use a different reader for the fixed and moving images.<br></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Fri, Apr 26, 2013 at 2:22 AM, Prateep Mukherjee <span dir="ltr"><<a href="mailto:pmukherj@umail.iu.edu" target="_blank">pmukherj@umail.iu.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word"><div>Hello all,</div><div><br></div><div> I am trying to use the Hammer registration method in ITK provided here (<a href="http://www.med.unc.edu/bric/ideagroup/free-softwares/fast-hammer" target="_blank">http://www.med.unc.edu/bric/ideagroup/free-softwares/fast-hammer</a>). However I am getting a continuous error of ImageIORegion.</div>
<div><br></div><div> I have pasted the relevant part of my code here.</div><div><br></div><div> <span style="font-family:Monaco;font-size:11px"><span style="color:#921e67">int</span></span><span style="font-family:Monaco;font-size:11px"> main(</span><span style="font-family:Monaco;font-size:11px"><span style="color:#921e67">int</span></span><span style="font-family:Monaco;font-size:11px"> argc,</span><span style="font-family:Monaco;font-size:11px"><span style="color:#921e67">char</span></span><span style="font-family:Monaco;font-size:11px"> *argv[]) </span></div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco">{</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco">
<span style="white-space:pre-wrap">        </span><span style="color:#921e67">float</span> XYZres = 1. ;</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco">
<span style="white-space:pre-wrap">        </span><span style="color:#921e67">int</span> nThreads = 1;</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco;color:rgb(51,68,252)">
<span style="color:#000000"><span style="white-space:pre-wrap">        </span></span><span style="text-decoration:underline;color:#000000">std::string</span><span style="color:#000000"> fixedFilename = </span>"/<span style="text-decoration:underline">usr</span>/local/<span style="text-decoration:underline">itk</span>/InsightToolkit-4.1.0/Examples/Data/RatLungSlice1.<span style="text-decoration:underline">mha</span>"<span style="color:#000000">;</span></div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco;color:rgb(51,68,252)"><span style="color:#000000"><span style="white-space:pre-wrap">        </span></span><span style="text-decoration:underline;color:#000000">std::string</span><span style="color:#000000"> movingFilename = </span>"/<span style="text-decoration:underline">usr</span>/local/<span style="text-decoration:underline">itk</span>/InsightToolkit-4.1.0/Examples/Data/RatLungSlice2.<span style="text-decoration:underline">mha</span>"<span style="color:#000000">;</span></div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco"><span style="white-space:pre-wrap">        </span><span style="text-decoration:underline">std::string</span> resampledFilename = <span style="color:#3344fc">"registered.mha"</span>;</div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco"> <span style="text-decoration:underline">std::string</span> iterationasstring = <span style="color:#3344fc">"50,50,50"</span>;</div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco;min-height:15px"><br></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco">
<span style="color:#921e67">unsigned</span> <span style="color:#921e67">int</span> iterations[3];</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco">
iterations[0] = 50; iterations[1] = 50; iterations[2] = 50;</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco;min-height:15px"><br></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco">
<span style="white-space:pre-wrap">        </span><span style="color:#921e67">double</span> scale = 7*(1./XYZres) ; <span style="color:#921e67">if</span>(scale<3) scale=3; <span style="text-decoration:underline">printf</span>(<span style="color:#3344fc">"scale=%f\n"</span>, scale) ;</div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco;min-height:15px"><br></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco;color:rgb(80,143,115)">
<span style="color:#000000"><span style="white-space:pre-wrap">        </span></span>/***** Model image, segmented *****/</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco;color:rgb(80,143,115)">
<span style="color:#000000"><span style="white-space:pre-wrap">        </span></span>/*Img_XY = 256 ;*/<span style="color:#000000"><span style="white-space:pre-wrap">        </span> </span></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco;min-height:15px">
<br></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco"><span style="white-space:pre-wrap">        </span><span style="text-decoration:underline">printf</span>(<span style="color:#3344fc">"\</span><span style="text-decoration:underline;color:#3344fc">nmodel</span><span style="color:#3344fc"> image : %s\n"</span>, fixedFilename.<span style="text-decoration:underline">c_str</span>()) ; </div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco"><span style="white-space:pre-wrap">        </span><span style="text-decoration:underline">printf</span>(<span style="color:#3344fc">"subject image : %s\n"</span>, movingFilename.<span style="text-decoration:underline">c_str</span>()) ; </div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco;min-height:15px"><br></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco;color:rgb(80,143,115)">
<span style="color:#000000"><span style="white-space:pre-wrap">        </span></span>/*** Load in fixed image and compute the attribute vectors ***/</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco">
<span style="white-space:pre-wrap">        </span><span style="text-decoration:underline;color:#006042">ReaderType</span><span style="text-decoration:underline">::Pointer</span> ImgReader = <span style="color:#006042">ReaderType</span>::<span style="text-decoration:underline">New</span>();</div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco"><span style="white-space:pre-wrap">        </span>ImgReader-><span style="text-decoration:underline">SetFileName</span>( fixedFilename.<span style="text-decoration:underline">c_str</span>() );</div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco;color:rgb(146,30,103)"><span style="color:#000000"><span style="white-space:pre-wrap">        </span></span>try</div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco"><span style="white-space:pre-wrap">        </span>{</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco">
<span style="white-space:pre-wrap">                </span>ImgReader-><span style="text-decoration:underline">Update</span>();</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco">
<span style="white-space:pre-wrap">        </span>}</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco"><span style="white-space:pre-wrap">        </span><span style="color:#921e67">catch</span>( <span style="text-decoration:underline">itk::ExceptionObject</span> *ex )</div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco"><span style="white-space:pre-wrap">        </span>{</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco">
<span style="white-space:pre-wrap">                </span><span style="text-decoration:underline">std::cerr</span> << ex << <span style="text-decoration:underline">std::endl</span>;</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco">
<span style="white-space:pre-wrap">        </span>}</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco"><span style="white-space:pre-wrap">        </span><span style="text-decoration:underline;color:#006042">ImageType</span><span style="text-decoration:underline">::Pointer</span> fImg0 = ImgReader-><span style="text-decoration:underline">GetOutput</span>();</div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco"><span style="white-space:pre-wrap">        </span>fImg0-><span style="text-decoration:underline">DisconnectPipeline</span>();</div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco;color:rgb(51,68,252)"><span style="color:#000000"><span style="white-space:pre-wrap">        </span></span><span style="text-decoration:underline;color:#000000">std::cout</span><span style="color:#000000"> << </span>"Fixed image file read in\n"<span style="color:#000000">;</span></div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco;min-height:15px"><br></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco;color:rgb(80,143,115)">
<span style="color:#000000"><span style="white-space:pre-wrap">        </span></span>/*** Load in moving image and compute the attribute vectors ***/</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco">
<span style="white-space:pre-wrap">        </span>ImgReader-><span style="text-decoration:underline">SetFileName</span>( movingFilename.<span style="text-decoration:underline">c_str</span>() );</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco;color:rgb(146,30,103)">
<span style="color:#000000"><span style="white-space:pre-wrap">        </span></span>try</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco"><span style="white-space:pre-wrap">        </span>{</div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco"><span style="white-space:pre-wrap">                </span>ImgReader-><span style="text-decoration:underline">Update</span>(); </div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco"><span style="white-space:pre-wrap">        </span>}</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco">
<span style="white-space:pre-wrap">        </span><span style="color:#921e67">catch</span>( <span style="text-decoration:underline">itk::ExceptionObject</span> *ex )</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco">
<span style="white-space:pre-wrap">        </span>{</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco"><span style="white-space:pre-wrap">                </span><span style="text-decoration:underline">std::cerr</span> << ex << <span style="text-decoration:underline">std::endl</span>;</div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco"><span style="white-space:pre-wrap">        </span>}</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco">
<span style="white-space:pre-wrap">        </span><span style="text-decoration:underline;color:#006042">ImageType</span><span style="text-decoration:underline">::Pointer</span> mImg0 = ImgReader-><span style="text-decoration:underline">GetOutput</span>();</div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco"><span style="white-space:pre-wrap">        </span>mImg0-><span style="text-decoration:underline">DisconnectPipeline</span>();</div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco;color:rgb(51,68,252)"><span style="color:#000000"><span style="white-space:pre-wrap">        </span></span><span style="text-decoration:underline;color:#000000">std::cout</span><span style="color:#000000"> << </span>"Moving image file read in\n"<span style="color:#000000">;</span></div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco;min-height:15px"><br></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco">
<span style="white-space:pre-wrap">        </span><span style="color:#921e67">typedef</span> itk::<span style="text-decoration:underline">HammerDeformableRegistrationImageFilter</span><</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco;color:rgb(0,96,66)">
<span style="color:#000000"><span style="white-space:pre-wrap">                </span></span>ImageType<span style="color:#000000">,</span></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco;color:rgb(0,96,66)">
<span style="color:#000000"><span style="white-space:pre-wrap">                </span></span>DeformationFieldType<span style="color:#000000">> </span>RegistrationFilterType<span style="color:#000000">;</span></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco;color:rgb(0,96,66)">
<span style="color:#000000"><span style="white-space:pre-wrap">        </span></span><span style="text-decoration:underline">RegistrationFilterType</span><span style="text-decoration:underline;color:#000000">::Pointer</span><span style="color:#000000"> hammer = </span>RegistrationFilterType<span style="color:#000000">::</span><span style="text-decoration:underline;color:#000000">New</span><span style="color:#000000">();</span></div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco;min-height:15px"><br></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco;color:rgb(80,143,115)">
<span style="color:#000000"><span style="white-space:pre-wrap">        </span></span>// hammer only need to know the fixed image, moving image, and </div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco;color:rgb(80,143,115)">
<span style="color:#000000"><span style="white-space:pre-wrap">        </span></span>// how attribute vectors are computed (also similarity computation)</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco;color:rgb(80,143,115)">
<span style="color:#000000"><span style="white-space:pre-wrap">        </span></span>// to perform registration</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco;min-height:15px">
<br></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco"><span style="white-space:pre-wrap">        </span>hammer-><span style="text-decoration:underline">SetFixedImage</span>( fImg0 );</div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco"><span style="white-space:pre-wrap">        </span>hammer-><span style="text-decoration:underline">SetMovingImage</span>( mImg0 );</div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco;min-height:15px"><br></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco;color:rgb(80,143,115)">
<span style="color:#000000"><span style="white-space:pre-wrap">        </span></span>// ----------------------------------------------------------</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco;color:rgb(80,143,115)">
<span style="color:#000000"><span style="white-space:pre-wrap">        </span></span>// define an attribute vector filter object and set it to the </div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco;color:rgb(80,143,115)">
<span style="color:#000000"><span style="white-space:pre-wrap">        </span></span>// hammer registration filter so the registration know </div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco;color:rgb(80,143,115)">
<span style="color:#000000"><span style="white-space:pre-wrap">        </span></span>// 1. How to compute attribute vectors</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco;color:rgb(80,143,115)">
<span style="color:#000000"><span style="white-space:pre-wrap">        </span></span>// 2. How to compute similarity between attribute vectors</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco;color:rgb(0,96,66)">
<span style="color:#000000"><span style="white-space:pre-wrap">        </span></span><span style="text-decoration:underline">AttributeFilterType</span><span style="text-decoration:underline;color:#000000">::Pointer</span><span style="color:#000000"> avFilter = </span>AttributeFilterType<span style="color:#000000">::</span><span style="text-decoration:underline;color:#000000">New</span><span style="color:#000000">();</span></div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco;color:rgb(80,143,115)"><span style="color:#000000"><span style="white-space:pre-wrap">        </span></span>// hammer->SetAttributeVectorFilter( avFilter );</div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco;color:rgb(80,143,115)"><span style="color:#000000"><span style="white-space:pre-wrap">        </span></span>// ----------------------------------------------------------</div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco;min-height:15px"><br></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco;color:rgb(80,143,115)">
<span style="color:#000000"><span style="white-space:pre-wrap">        </span></span>// ----------------------------------------------------------</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco;color:rgb(80,143,115)">
<span style="color:#000000"><span style="white-space:pre-wrap">        </span></span>// the following lines set parameters for HAMMER registration</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco;color:rgb(80,143,115)">
<span style="color:#000000"><span style="white-space:pre-wrap">        </span></span>// all these parameters should have default values</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco">
hammer-><span style="text-decoration:underline">SetIterations</span>( iterations[0], iterations[1], iterations[2] );</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco">
<span style="white-space:pre-wrap">        </span>hammer-><span style="text-decoration:underline">SetDeformRate</span>(0.05);</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco">
<span style="white-space:pre-wrap">        </span>hammer-><span style="text-decoration:underline">SetPointMatchingThreshold</span>(0.8);</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco">
<span style="white-space:pre-wrap">        </span>hammer-><span style="text-decoration:underline">SetSubvolumnSimilarityThreshold</span>(0.6);</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco">
<span style="white-space:pre-wrap">        </span>hammer-><span style="text-decoration:underline">SetSearchRadius</span>(12);</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco;min-height:15px">
<br></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco"><span style="white-space:pre-wrap">        </span>hammer-><span style="text-decoration:underline">GenerateInputRequestedRegion</span>();</div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco;color:rgb(80,143,115)"><span style="color:#000000"><span style="white-space:pre-wrap">        </span></span>// ----------------------------------------------------------</div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco;min-height:15px"><br></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco">
<span style="white-space:pre-wrap">        </span><span style="text-decoration:underline">clock_t</span> Start = <span style="text-decoration:underline">clock</span>();</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco">
<span style="white-space:pre-wrap">        </span><span style="color:#921e67">try</span> {</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco"> <span style="white-space:pre-wrap">                </span>hammer-><span style="text-decoration:underline">Update</span>(); // Also tried UpdateLargestPossibleRegion() here. Doesn't work !!</div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco"> <span style="white-space:pre-wrap">        </span>} <span style="color:#921e67">catch</span>( <span style="text-decoration:underline">itk::ExceptionObject</span> &e)</div>
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco"> <span style="white-space:pre-wrap">        </span>{</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco">
<span style="white-space:pre-wrap">                </span><span style="text-decoration:underline">std::cerr</span> << e << <span style="text-decoration:underline">std::endl</span>;</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco">
<span style="white-space:pre-wrap">        </span>}</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco"><br></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco">
}</div><div><br></div><div><br></div><div> The error I am getting is :</div><div><br></div><div><b> Description: itk::ERROR: ImageFileWriter(0x101d01e30): Largest possible region does not fully contain requested paste IO regionPaste IO region: ImageIORegion (0x7fff5fbfe3c0)</b></div>
<div><br></div><div> Please help me to debug this. </div><br><div>
<div><div>---</div><div>Thanks,</div><div>Prateep </div></div></div></div><br>_____________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Unpaid intern in BillsBasement at noware dot com<br>
</div>