<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
Hi, Luis,<div><br></div><div>I found that another parameter could affect the result. If I change gridSizeOnImage.Fill( 8 ) to </div><div>gridSizeOnImage.Fill( 10 ), it could result in the case with 59 slices that used to run 34 iterations </div><div>only run one iteration.</div><div><br></div><div>So it is really depending on the parameters you input.</div><div><br></div><div>Thanks.</div><div><br></div><div>Sean<br><br><hr id="stopSpelling">From: kevinseanlee@live.com<br>To: luis.ibanez@kitware.com<br>Date: Thu, 9 Jul 2009 12:53:39 -0500<br>CC: insight-users@itk.org<br>Subject: Re: [Insight-users] problems on deformable registration 8<br><br>
<style>
.ExternalClass .EC_hmmessage P
{padding:0px;}
.ExternalClass body.EC_hmmessage
{font-size:10pt;font-family:Verdana;}
</style>
Hi, Luis,<div><br></div><div>I am trying to provide more information and tested it with several other numbers. Here is the results.</div><div><br></div><div>29, 56, 57, 58, 60 slices: 1 iteration with a bad result.</div><div><br></div><div>30 slices; 45 iterations with a good result. (of course, only half volume is matched)</div><div>59 slices; 34 iterations with a good result.<br><br></div><div>Let me know what I can do for this issue.</div><div><br></div><div>Thanks.</div><div><br></div><div>Sean</div><div><br><hr id="EC_stopSpelling">From: kevinseanlee@live.com<br>To: luis.ibanez@kitware.com<br>Date: Thu, 9 Jul 2009 08:22:59 -0500<br>CC: insight-users@itk.org<br>Subject: Re: [Insight-users] problems on deformable registration 8<br><br>
<style>
.ExternalClass .EC_hmmessage P
{padding:0px;}
.ExternalClass body.EC_hmmessage
{font-size:10pt;font-family:Verdana;}
</style>
Hi, Luis,<div><br></div><div>Thanks for your reply.</div><div><br></div><div>> A) Did you make *any* changes to the source code<br>> of the DeformableRegistration8.cxx example ?<br>I believe I did not.</div><div><br></div><div>> B) How are you reading your images ?<br></div>> Are they DICOM files ?<br>> Are you using a Series Reader ?<div>They are raw data with mhd or mha header files and I used following filter to read them.</div><div><div><span class="EC_EC_Apple-tab-span" style="white-space:pre">        </span>VolumeReaderType::Pointer fixVolumeReader = VolumeReaderType::New();</div><div><span class="EC_EC_Apple-tab-span" style="white-space:pre">        </span>fixVolumeReader->SetFileName(fixVolumeFileName);</div><div><span class="EC_EC_Apple-tab-span" style="white-space:pre">        </span>fixVolumeReader->Update();</div><div><br></div><div>> C) How *exactly* have you been removing slices from them.<br></div><div>My original volume are 512X512. First I down-sampled them to 256X256 with itk::ResampleImageFilter and then</div><div>run itk::ExtractImageFilter with following setting</div><div><div><span class="EC_EC_Apple-tab-span" style="white-space:pre">        </span>Input3DImageType::RegionType sliceRegion;</div><div><span class="EC_EC_Apple-tab-span" style="white-space:pre">        </span>Input3DImageType::IndexType sliceStartPoint;</div><div><span class="EC_EC_Apple-tab-span" style="white-space:pre">        </span>sliceStartPoint[0] = 0;</div><div><span class="EC_EC_Apple-tab-span" style="white-space:pre">        </span>sliceStartPoint[1] = 0;</div><div><span class="EC_EC_Apple-tab-span" style="white-space:pre">        </span>sliceStartPoint[2] = 0;</div><div><span class="EC_EC_Apple-tab-span" style="white-space:pre">        </span>Input3DImageType::SizeType NewVolumeSize;</div><div><span class="EC_EC_Apple-tab-span" style="white-space:pre">        </span>NewVolumeSize[0]=fixVolumeSize[0];</div><div><span class="EC_EC_Apple-tab-span" style="white-space:pre">        </span>NewVolumeSize[1]=fixVolumeSize[1];</div><div><span class="EC_EC_Apple-tab-span" style="white-space:pre">        </span>NewVolumeSize[2]=59; //or 60 !!!!! here is the way I selecting the number of slices !!!!!</div><div><span class="EC_EC_Apple-tab-span" style="white-space:pre">        </span>sliceRegion.SetSize(NewVolumeSize);</div><div><span class="EC_EC_Apple-tab-span" style="white-space:pre">        </span>sliceRegion.SetIndex(sliceStartPoint);</div><div>It is my understanding that the volume size should not affect the results that much. But like what I experienced </div><div>earlier, changing that number could result in reaching "Convergence: function tolerance reached." without a good result. </div><div>I hope it can always reach "Convergence: gradient tolerance reached." </div><div><br></div><div>Thanks.</div><div><br></div><div>Sean</div></div><br>> Date: Wed, 8 Jul 2009 18:08:48 -0400<br>> From: luis.ibanez@kitware.com<br>> To: kevinseanlee@live.com<br>> CC: insight-users@itk.org<br>> Subject: Re: [Insight-users] problems on deformable registration 8<br>> <br>> <br>> Hi Sean,<br>> <br>> <br>> The Exception<br>> <br>> itk::InvalidRequestedRegionError<br>> <br>> <br>> doesn't seem to be related to the registration process.<br>> <br>> <br>> A) Did you make *any* changes to the source code<br>> of the DeformableRegistration8.cxx example ?<br>> <br>> <br>> B) How are you reading your images ?<br>> Are they DICOM files ?<br>> Are you using a Series Reader ?<br>> <br>> <br>> C) How *exactly* have you been removing slices from them.<br>> <br>> <br>> D) 2Gb of RAM should be enough for registering two images of<br>> 64 slices with 256x256 pixels each.<br>> <br>> <br>> <br>> <br>> Something else is going on here....<br>> <br>> <br>> <br>> Please let us know about (A),(B) and (C)<br>> <br>> <br>> <br>> Thanks<br>> <br>> <br>> <br>> Luis<br>> <br>> <br>> <br>> <br>> <br>> ------------------<br>> Sean lee wrote:<br>> > Hi, Luis,<br>> > <br>> > Thank you for your reply.<br>> > <br>> > I have 2GB RAM. Here is the error message if I run more than 62 slices: <br>> > Unhandled exception at 0x7c812afb in RegTest.exe: Microsoft C++ <br>> > exception: itk::InvalidRequestedRegionError at memory location 0x0013fbbc..<br>> > <br>> > My CT volumes are liver images from two different phases. <br>> > <br>> > I also did another test on these two volumes by switch them (switch <br>> > fixed and moving volumes). If I run 62 slices,, it would come with same <br>> > memory problem (see above error message). This time if I run 60 slices, <br>> > it would reach "CONVERGENCE: REL_REDUCTION_OF_F <= FACTR*EPSMCH" after <br>> > one iteration; but it seems 59 slices allow me to run 34 iterations and <br>> > gave me a good result.<br>> > <br>> > So, it seems the good results came with "reach Projected Gradient <br>> > Tolerance". If it reaches "CONVERGENCE: REL_REDUCTION_OF_F <= <br>> > FACTR*EPSMCH" first, it come with a "bad" result. How can I control this <br>> > situation?<br>> > <br>> > Thanks.<br>> > <br>> > Sean<br>> > <br>> > > Date: Wed, 8 Jul 2009 17:39:25 -0400<br>> > > From: luis.ibanez@kitware.com<br>> > > To: kevinseanlee@live.com<br>> > > CC: insight-users@itk.org<br>> > > Subject: Re: [Insight-users] problems on deformable registration 8<br>> > ><br>> > ><br>> > > Hi Sean,<br>> > ><br>> > > This is very suspicious.<br>> > ><br>> > ><br>> > > A) your images do not seem to be that big...<br>> > ><br>> > > One image of:<br>> > ><br>> > > 64 slices of 256 x 256 in 16bits<br>> > ><br>> > > will take 8 Mb<br>> > ><br>> > ><br>> > > How much RAM do you have ?<br>> > ><br>> > ><br>> > > B) Just removing one slice (out of 60) from your<br>> > > dataset shouldn't lead the registration to<br>> > > behave differently.<br>> > ><br>> > ><br>> > > Unless...<br>> > ><br>> > > There is some special content in that slice...<br>> > ><br>> > > Are any objects in Slice 60 that have very<br>> > > different intensities to those objects visible<br>> > > in slice 59 ?<br>> > ><br>> > ><br>> > > ...and...<br>> > ><br>> > ><br>> > > C) How are you removing that slice ?<br>> > ><br>> > > Are you using a region of interest extraction first ?<br>> > ><br>> > ><br>> > ><br>> > ><br>> > > Please let us know,<br>> > ><br>> > ><br>> > > Thanks<br>> > ><br>> > ><br>> > ><br>> > > Luis<br>> > ><br>> > ><br>> > ><br>> > > ---------------<br>> > > Sean lee wrote:<br>> > > > Hello,<br>> > > ><br>> > > > I am trying to use the example of deformable registration 8 on two ct<br>> > > > image volumes (64 256X256 slices). The problem is If i use more <br>> > than 62<br>> > > > slices, I would have memory problem; I run 60 slice, I got a perfect<br>> > > > results with 20 iterations; but if I run 59 slices, it only run one<br>> > > > iteration and reaches "CONVERGENCE: REL_REDUCTION_OF_F <= <br>> > FACTR*EPSMCH".<br>> > > > I tried to reduce the Cost Function Convergence Factor to 1e+1 and it<br>> > > > still comes same results. What could be the problem and any suggested<br>> > > > solutions? Thanks. Sean<br>> > > > ><br>> > > ><br>> > > > <br>> > ------------------------------------------------------------------------<br>> > > ><br>> > > > _____________________________________<br>> > > > Powered by www.kitware.com<br>> > > ><br>> > > > Visit other Kitware open-source projects at<br>> > > > http://www.kitware.com/opensource/opensource.html<br>> > > ><br>> > > > Please keep messages on-topic and check the ITK FAQ at: <br>> > http://www.itk.org/Wiki/ITK_FAQ<br>> > > ><br>> > > > Follow this link to subscribe/unsubscribe:<br>> > > > http://www.itk.org/mailman/listinfo/insight-users<br>> > <br>> > ------------------------------------------------------------------------<br>> > Windows Live™ SkyDrive™: Get 25 GB of free online storage. Get it on <br>> > your BlackBerry or iPhone. <br>> > <http://windowslive.com/online/skydrive?ocid=TXT_TAGLM_WL_SD_25GB_062009><br></div><br><hr>Hotmail® has ever-growing storage! Don’t worry about storage limits. <a href="http://windowslive.com/Tutorial/Hotmail/Storage?ocid=TXT_TAGLM_WL_HM_Tutorial_Storage_062009">Check it out.</a></div><br><hr>Windows Live™ SkyDrive™: Get 25 GB of free online storage. <a href="http://windowslive.com/online/skydrive?ocid=TXT_TAGLM_WL_SD_25GB_062009">Get it on your BlackBerry or iPhone.</a></div><br /><hr />Insert movie times and more without leaving Hotmail®. <a href='http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd_062009' target='_new'>See how.</a></body>
</html>