[Insight-users] MultiResMIRegistration with masking

Luis Ibanez luis.ibanez at kitware.com
Sat Mar 19 20:41:26 EST 2005


Hi Martin,

This particular demo application (MultiResMIRegistration) uses the

              MutualInformationImageToImageMetric

http://www.itk.org/Insight/Doxygen/html/classitk_1_1MutualInformationImageToImageMetric.html

This Metric doesn't support yet the use of Fixed and Moving Masks.




You may want ot replace the metric with

               MattesMutualInformationImageToImageMetric

http://www.itk.org/Insight/Doxygen/html/classitk_1_1MattesMutualInformationImageToImageMetric.html


this last metric does support the use of Fixed and Moving  masks.






Please make an entry in the Bug tracker regarding this issue:

                 http://www.itk.org/Bug/




    Thanks


        Luis



---------------------------------
Martin Kavec wrote:

> Hi,
> 
> I am trying to modify InsightApplications-2.0.0/MultiResMIRegistration to 
> perform registration based on a region defined by masking either fixed or 
> moving image.
> 
> Here are the modifications I made in MIMRegistrator.h:
> 
> 31a32,36
> #include "itkImageMaskSpatialObject.h"
> #include "itkBinaryThresholdImageFilter.h"
> 148a154,164
> typedef ImageMaskSpatialObject< TMovingImage::ImageDimension >   MaskType;
> typedef BinaryThresholdImageFilter< MovingImageType, Image< unsigned char, 3 > 
> FilterType;
> 219a236,240
> typename MaskType::Pointer                  spatialObjectMask;
> typename FilterType::Pointer                filter;
> 
> and MIMRegistrator.txx
> 
> 54a57,61
> spatialObjectMask  = MaskType::New();
> filter = FilterType::New();
> 135a148,161
> //Setup filter
> filter->SetOutsideValue( 0 );
> filter->SetInsideValue( 1 );
> filter->SetLowerThreshold( 150 );
> filter->SetInput( m_MovingImage );
> filter->Update();
> 
> spatialObjectMask->SetImage( filter->GetOutput() );
> 
> m_Metric->SetMovingImageMask( spatialObjectMask );
> 
> 
> The problem is that no matter how I SetLowerThreshold, I always get identical  
> output transformation. I get perfect registration even if I set the threshold 
> to 235/255 so only few pixeld pass the threshold. It seems to me as if the 
> mask would not have any effect on the registration.
> 
> In the same manner I modified MultiResImageRegistration2 from 
> ITK/Examples/Registration (with appropriate filter->SetInput( ... ) ) and 
> there it works just fine.
> 
> I suspect m_MovingImage is not passed correctly to the filter, but when I call 
> m_MovingImage->Print(std::cout), it seems it contains the correct image.
> 
> I would very much appreciate any help.
> 
> Martin
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
> 
> 





More information about the Insight-users mailing list