[Insight-users] ImageRegistration4
Luis Ibanez
luis.ibanez at kitware.com
Wed May 26 13:53:05 EDT 2010
Hi Ganesh,
No, that line change is not enough.
You must also balance the number of parameters for
the Translation transform.
In particular,
lines 259-260
initialParameters[0] = 0.0; // Initial offset in mm along X
initialParameters[1] = 0.0; // Initial offset in mm along Y
should become
initialParameters[0] = 0.0; // Initial offset in mm along X
initialParameters[1] = 0.0; // Initial offset in mm along Y
initialParameters[2] = 0.0; // Initial offset in mm along Z
and lines 325-326:
double TranslationAlongX = finalParameters[0];
double TranslationAlongY = finalParameters[1];
should become:
double TranslationAlongX = finalParameters[0];
double TranslationAlongY = finalParameters[1];
double TranslationAlongZ = finalParameters[2];
Without these additional changes you will be
running your code with uninitialized variables.
Regards,
Luis
-----------------------------------------------------------------
On Tue, May 25, 2010 at 2:10 PM, Ganesh Narayanasamy
<nganesh76 at hotmail.com>wrote:
>
> I converted the ImageRegistration4.cxx on MattesMutualInformation technique
> from 2D into 3D by changing line #123 from 2 to 3:
> const unsigned int Dimension = 3;
>
> Is that all that needs to be done?
> When I did Build Solution and ran the executable with 2 input images and a
> name for an output image, I got this error message:
>
>
> ****
> C:\Ganesh\ITK316\Build\bin\Debug>ImageRegistration4 P1T1Img1.mha P1T2
> Img2.mha Final_P1T1fT2m.mha
>
> ExceptionObject caught !
>
> itk::ExceptionObject (0146FB48)
> Location: "void __thiscall
> itk::MattesMutualInformationImageToImageMetric<class
> itk::Image<unsigned short,3>,class itk::Image<unsigned short,3>
> >::GetValueAndDe
> rivative(const class itk::Array<double> &,double &,class itk::Array<double>
> &) c
> onst"
> File:
> c:\ganesh\itk316\itk\code\algorithms\itkMattesMutualInformationImageToImag
> eMetric.txx
> Line: 1113
> Description: itk::ERROR:
> MattesMutualInformationImageToImageMetric(019441E0): To
> o many samples map outside moving image buffer: 0 / 10000
> ****
>
>
> Can you identify the error and let me know any corrective step?
> Thanks for your help,
> Ganesh
>
> ------------------------------
> The New Busy is not the old busy. Search, chat and e-mail from your inbox. Get
> started.<http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_3>
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100526/92cb8da3/attachment.htm>
More information about the Insight-users
mailing list