<DIV>Hi Karthik,</DIV>
<DIV> </DIV>
<DIV>Thanks!</DIV>
<DIV> </DIV>
<DIV>I found the problem: there was something wrong with my region.</DIV>
<DIV>It is OK now.</DIV>
<DIV>But by using SetFixedImageRegion(), I didn't see much difference in running time.</DIV>
<DIV> </DIV>
<DIV>And I am not quite sure about "initial transform". Do you mean I should set a initial transform that is close to the registration result?</DIV>
<DIV>What is the function of the code below?</DIV>
<DIV>> VersorType rotation;<BR>> VectorType axis;<BR>><BR>> axis[0] = 0.0;<BR>> axis[1] = 0.0;<BR>> axis[2] = 1.0;/<BR>> / const double angle = 0;/<BR>> / rotation.Set( axis, angle );/<BR>> / transform->SetRotation( rotation );/<BR></DIV>
<DIV>I use only 10k samples in registration and cost around 5 min, is it normal?</DIV>
<DIV> </DIV>
<DIV>Thanks!</DIV>
<DIV> </DIV>
<DIV>Best regards,</DIV>
<DIV>Yu Qi</DIV>
<DIV><BR><B><I>Karthik Krishnan <Karthik.Krishnan@kitware.com></I></B> wrote:</DIV>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">Hi Yu,<BR><BR>I think the problem is that you are using SetRegion(). Instead you<BR>should be using SetFixedImageRegion(). You do not want to modify the<BR>co-ords of the image, rather restrict computation of the metric to the<BR>region where the brain is (+ a border as suggested below). This speeds<BR>up registration and also ensures that the registration is not affected<BR>by irrelevant data.<BR><BR>Please print out the initial transform. If you say that it works well<BR>before setting the region, your initial transform should be close to the<BR>one you got prior to setting the regions.<BR><BR>thanks<BR>karthik<BR><BR>Yu Qi wrote:<BR><BR>> Hi Karthik,<BR>> I did use the initializer to set centre. But I wonder if it matters<BR>> that I set region before set centre. Does one influence the other?<BR>> The tranform parameters used in my application are copied from
example<BR>> ImageRegistration8.cxx as follows<BR>> /VersorType rotation;<BR>> VectorType axis;<BR>><BR>> axis[0] = 0.0;<BR>> axis[1] = 0.0;<BR>> axis[2] = 1.0;/<BR>> / const double angle = 0;/<BR>> / rotation.Set( axis, angle );/<BR>> / transform->SetRotation( rotation );/<BR>><BR>> and the/ translationScale = 1.0 / 1000.0;/<BR>><BR>> / optimizer->SetMaximumStepLength( 0.2000 );<BR>> optimizer->SetMinimumStepLength( 0.0001 );/<BR>><BR>> my data sets are MRI 256X256X256<BR>><BR>> and fMRi 64X64X28<BR>><BR>> is there any problems with these settings?<BR>><BR>> Thank you!<BR>><BR>> Best regards,<BR>><BR>> Yu Qi<BR>><BR>><BR>><BR>> */Karthik Krishnan <KARTHIK.KRISHNAN@KITWARE.COM>/* wrote:<BR>><BR>> Hi Yu,<BR>><BR>> Print out the parameters of the transform. There just isn't enough<BR>> overlap between the fixed and the moving image to start with (or the<BR>>
transform is driving you too far away too soon). See<BR>> itkMattesMutualInformationImageToImageMetric.txx<BR>><BR>><BR>> Line: 702<BR>> if( nSamples < m_NumberOfSpatialSamples / 4 )<BR>> {<BR>> itkExceptionMacro( "Too many samples map outside moving image<BR>> buffer: "<BR>> << nSamples << " / " << m_NumberOfSpatialSamples << std::endl );<BR>> }<BR>><BR>><BR>> Remember that if you are using the centered transform, set the center<BR>> (for example with the CenteredTransformInitializer helper class).<BR>><BR>> See Examples/Registration/ImageRegistration9.cxx<BR>><BR>> Thanks<BR>> kk<BR>><BR>> Yu Qi wrote:<BR>><BR>> > Hi Luis,<BR>> > Thanks for your instruction.<BR>> > I tried to set region to the fixed image by setting<BR>> > start[2]=size[2]/2 and size[2]/=2 immediately after reading the<BR>> image.<BR>> > I use the Mattes MI metric and Centered Rigid 3D
image<BR>> transformation.<BR>> > But every time I tried to run the .exe, it always told me there are<BR>> > too many samples outside the moving image. And I choose a smaller<BR>> > number for number of samples. I still got the same exception.<BR>> > Why should this happen?<BR>> > It works well before I set the region.<BR>> > Best Regards,<BR>> > Yu Qi<BR>> ><BR>> > */Luis Ibanez /* wrote:<BR>> ><BR>> ><BR>> > Hi Yu,<BR>> ><BR>> > Yes, you can use ITK for registering a fMRI to an MRI<BR>> > even if they dont fully cover the same anatomical<BR>> > regions.<BR>> ><BR>> > You may want to use the MRI image as the Fixed image and<BR>> > set the FixedImageRegion to the rectangular box that covers<BR>> > the brain plus a border of about 10 millimeters. Take the<BR>> > fMRI image as the Moving image.<BR>> ><BR>> >! You may want to use any of the
MutualInformation Metrics<BR>> > available in ITK.<BR>> ><BR>> > For a full list of the Image Metrics please look at the<BR>> > Groups in Doxygen:<BR>> ><BR>> ><BR>> http://www.itk.org/Insight/Doxygen/html/group__RegistrationMetrics.html<BR>> ><BR>> ><BR>> ><BR>> > Regards,<BR>> ><BR>> ><BR>> > Luis<BR>> ><BR>> ><BR>> > ------------------<BR>> > Yu Qi wrote:<BR>> ><BR>> > > Hi,<BR>> > ><BR>> > > I have a MRI volume of the whole head and<BR>> > > a fMRI volume of the brain.<BR>> > ><BR>> > > Can I register these two directly with ITK?<BR>> > ><BR>> > > Do I! need to use the SetRegion() to MRI volume?<BR>> > ><BR>> > > Thanks!<BR>> > ><BR>> > ><BR>> > ><BR>> > ><BR>> > > *Best Regards!*<BR>> > > **<BR>> > > *Yu Qi*<BR>>
> ><BR>> > ><BR>> > ><BR>> > ><BR>> > ><BR>> ><BR>> ------------------------------------------------------------------------<BR>> > > *D! o You Yahoo!?*<BR>> > > 150万曲MP3疯狂搜,带您闯入音乐殿堂<BR>> > > 美女明星应有尽有,搜遍美图、艳图和酷图<BR>> > > 1G就是1000兆,雅虎电邮自助扩容!<BR>> > ><BR>> > ><BR>> > ><BR>> > ><BR>> > ><BR>> ><BR>> ------------------------------------------------------------------------<BR>> > ><BR>> > > _______________________________________________<BR>> > > Insight-users mailing list<BR>> > > Insight-users@itk.org<BR>> > > http://www.itk.org/mailman/listinfo/insight-users<BR>> ><BR>> ><BR>> ><BR>> ><BR>> ><BR>> ------------------------------------------------------------------------<BR>> > *Do You Yahoo!?*<BR>> >
150万曲MP3疯狂搜,带您闯入音乐殿堂<BR>> > 美女明星应有尽有,搜遍美图、艳图和酷图<BR>> > 1G就是1000兆,雅虎电邮自助扩容!<BR>> ><BR>> ><BR>> ><BR>> >------------------------------------------------------------------------<BR>> ><BR>> >_______________________________________________<BR>> >Insight-users mailing list<BR>> >Insight-users@itk.org<BR>> >http://www.itk.org/mailman/listinfo/insight-users<BR>> ><BR>> ><BR>><BR>><BR>> ------------------------------------------------------------------------<BR>> *Do You Yahoo!?*<BR>> 150万曲MP3疯狂搜,带您闯入音乐殿堂 <HTTP: music.yisou.com><BR>> 美女明星应有尽有,搜遍美图、艳图和酷图 <HTTP: image.yisou.com><BR>> 1G就是1000兆,雅虎电邮自助扩容!<BR>> <HTTP: mail_1g event cn.mail.yahoo.com *http: 1g tag mail_cn cn.rd.yahoo.com
/><BR>><BR>><BR>>------------------------------------------------------------------------<BR>><BR>>_______________________________________________<BR>>Insight-users mailing list<BR>>Insight-users@itk.org<BR>>http://www.itk.org/mailman/listinfo/insight-users<BR>> <BR>><BR><BR></BLOCKQUOTE><p><br><hr size=1><b>Do You Yahoo!?</b><br>
<a href="http://music.yisou.com" target=blank>150万曲MP3疯狂搜,带您闯入音乐殿堂</a><br><a href="http://image.yisou.com" target=blank>美女明星应有尽有,搜遍美图、艳图和酷图</a><br>
<a href="http://cn.rd.yahoo.com/mail_cn/tag/1g/*http://cn.mail.yahoo.com/event/mail_1g/" target=blank>1G就是1000兆,雅虎电邮自助扩容!</a>