[Insight-users] Imagemask for registration: possible to create non-structured mask?

michiel mentink michael.mentink at st-hughs.ox.ac.uk
Tue Feb 23 06:13:52 EST 2010


thank you Luis, the source code compiles and links now.

However, I get this runtime error:

Starting proces...

ExceptionObject caught !

itk::ExceptionObject (0x998f420)
Location: "void itk::MeanSquaresImageToImageMetric<TFixedImage,
TMovingImage>::GetValueAndDerivative(const typename
itk::ImageToImageMetric<TFixedImage,
TMovingImage>::TransformParametersType&, typename
itk::ImageToImageMetric<TFixedImage, TMovingImage>::MeasureType&, typename
itk::ImageToImageMetric<TFixedImage, TMovingImage>::DerivativeType&) const
[with TFixedImage = itk::Image<float, 3u>, TMovingImage = itk::Image<float,
3u>]"
File:
/MMprogs/src/ITK_src/Code/Algorithms/itkMeanSquaresImageToImageMetric.txx
Line: 364
Description: itk::ERROR: MeanSquaresImageToImageMetric(0x99423f0): All the
points mapped to outside of the moving image


Just to be sure, I swapped moving and fixed image around and that didn't
help...

I'd like to troubleshoot what is going wrong. If I understand correctly (and
correct me if I'm wrong), the register algorithm tries to compare points
that are outside one of the images. Both images do not have the same size,
one of them is approximately half the size of the other.

Can anybody give me some ideas how to get information about point coordinate
locations etc?

cheers, Michael

On Mon, Feb 22, 2010 at 11:34 PM, Luis Ibanez <luis.ibanez at kitware.com>wrote:

> Hi Michiel,
>
> Why do you want to use a non-structured 3D mask, if you already
> have a binary mask from your segmentation, and you just need
> to connect it to the itk::ImageMaskSpatialObject ?
>
> Please look at the example:
>
>         Insight/Examples/Registration/
>                            ImageRegistration12.cxx
>
> It shows how to use image masks in a registration process.
>
>    Regards,
>
>
>             Luis
>
>
> --------------------------------------------
> On Mon, Feb 22, 2010 at 12:23 PM, michiel mentink
> <michael.mentink at st-hughs.ox.ac.uk> wrote:
> >
> > I have a segmented 3D volume in binary format (foreground, background).
> >
> > I'd like to convert this into an image mask, so I can rigidly register
> the
> > segmented volume, using the mask, to its' original, unsegmented volume.
> > (I'm basically extending the imageRegistration8 example).
> >
> > Is it possible to create a non-structured 3D mask? (with random entries
> > for mask points)
> >
> > Has anybody got an example how to do so?
> >
> > cheers,
> > Michael
> >
> > _____________________________________
> > 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/20100223/1d94c9e5/attachment.htm>


More information about the Insight-users mailing list