[Insight-users] Re: 3D image registration with masking
Angela Lee
angela.lee at auckland.ac.nz
Wed Dec 5 22:06:43 EST 2007
Hi all,
I figured out why it wasn't working.
It was because the origin of my images was different.
I used the ChangeInformationFilter in creating the 3D images made from
cropping 2D Dicom slices, and this solved my problem.
Thanks,
Angela
Angela Lee wrote:
> Hi all,
>
> I am trying to rigidly register 3D (gipl) images using a mask, I have
> used Normalised Correlation (NC) and Normalised Mutual Information (NMI)
> metrics by modifying ImageRegistration14.cxx and ImageRegistration8.cxx,
> I have attached my versions of the code.
> I am using NMI as I would like to extend into other imaging modalities
> later on.
>
> I tried out the code on the same image to make sure I get the ideal
> value of the metric (-1 for NC and 2 for NMI)
>
> My code works fine when I use a very simple mask, that has 50% white
> pixels.
> I created a 3D mask using a stack of 2D images I generated using another
> software program.
> However when I try to use my 3D mask I get this error for my code using
> the NMI metric:
>
> ------------------------
> Initial transform parameters = [0, 0, 0, 0, 0, 0]
> optimizerScales = [10000, 10000, 10000, 0.0599532, 0.0731429, 0.0769231]
> ExceptionObject caught !
>
> itk::ExceptionObject (0x85cf650)
> Location: "void itk::HistogramImageToImageMetric<TFixedImage,
> TMovingImage>::ComputeHistogram(const typename
> itk::ImageToImageMetric<TFixedImage,
> TMovingImage>::TransformParametersType&,
> itk::Statistics::Histogram<double, 2u,
> itk::Statistics::DenseFrequencyContainer>&) const [with TFixedImage =
> itk::Image<unsigned char, 3u>, TMovingImage = itk::Image<unsigned char,
> 3u>]"
> File:
> /people/alee071/Desktop/itk/InsightToolkit-3.2.0/Code/Algorithms/itkHistogramImageToImageMetric.txx
> Line: 303
> Description: itk::ERROR:
> NormalizedMutualInformationHistogramImageToImageMetric(0x85c13b8): All
> the points mapped to outside of the moving image
> ------------------------
>
> I also have an issue with using my normalised correlation metric code
> with the mask, when I try without a mask, I get :
> Metric value (ideal = -1) = -1
>
> But when I try with my mask I get :
> Metric value (ideal = -1) = 0
>
> I think my problem may be that my 3D mask has a low percentage of white
> pixels.
>
> My code and the images can be found on:
> ftp://ftp.bioeng.auckland.ac.nz/alee071/
>
> Is there anyway I can get past this?
> Any help is greatly appreciated. :)
>
> Thanks,
> Angela
>
>
>
>
>
>
>
>
>
>
More information about the Insight-users
mailing list