[Insight-users] BSpline Transformation and binary images

Serena Fabbri fabbri at u.washington.edu
Thu Oct 15 14:49:47 EDT 2009


Hi Luis,

I have taken a look to itkMattesMutualInformationImageToImageMetric, and the problems seem to be:
-line 241 (Initialize):  m_NumberOfHistogramBins is unsigned long and the value of brackets 
expression is (-2). It can not be assigned.
-line 677 (ComputeFixedImageParzenWindowIndices): same problem and besides pindex is unsigned 
int and it can not be (-1) the correct value.
-line 758 (GetValue): same problem and again movingImageParzenWindowindex is unsigned int and it 
can not be (-1).

I am not sure that to do a cast is ok because after the cast (line 682 
ComputeFixedImageParzenWindowIndices),  (*iter).FixedimageParzenWindowIndex will be 1 and 2 and 
they (at least 2) can not be indexes  for m_FixedImageMarginalPDF (line 767 GetValue) because the 
dimension of this array is the number of the bin (=2).

Do you agree with me?


Now I am running Cardinality Metric with Amoeba optmizer and BSpline  Transformation.
My image are (80;80;101) pixelsize and (4;4;1)mm spacing.

I have set
         simplexDelta.Fill( 5.0 );
         optimizer->AutomaticInitialSimplexOff();
         optimizer->SetInitialSimplexDelta( simplexDelta );
         optimizer->SetParametersConvergenceTolerance( 2 );
         optimizer->SetFunctionConvergenceTolerance(1);
         optimizer->SetMaximumNumberOfIterations( 200 );

I'd like to ask you how long the registration task can be, because it started 2 days ago and it is still 
running.
Besides I have put 
optimizer->GetOptimizer()->get_num_evaluations() 
in observer code but it doesn't work. How can I do to visualize the number of iteration during the 
process?


Thank you for any info.

Serena.





On Mon, 12 Oct 2009, Luis Ibanez wrote:

> Hi Serena,
>
> I believe Hans Johnson reported a while ago that this
> metric implementation had a bug that make it unsuitable
> for registering binary images.
>
> (My mistake for suggesting to use this metric for this
> case without having tried).
>
> Your options at this point are:
>
>
>            A) Help us debug the metric   :-)
>
>
>            B) Use the Cardinality Metric instead.
>                 itkMatchCardinalityImageToImageMetric.h
>
>
> Please let us know what would be your preference,
>
>
>     Thanks
>
>
>            Luis
>
>
> -----------------------------------------------------------------
> On Mon, Oct 12, 2009 at 7:23 PM, Serena Fabbri <fabbri at u.washington.edu> wrote:
>> Hi All,
>>
>> I am trying to register binary images of the head using Non Rigid
>> Registration. They are (80;80;101) pixelsize and (4;4;1)mm spacing.
>>
>> I use Mattes-MI, LBFGSB, NearestNeighbor interpolator and BSpline
>> Transformation.
>> After reading the email
>> http://www.itk.org/pipermail/insight-users/2007-November/024178.html
>>
>> I set 2 bin and 10% of statistic for MI and I have got this message:
>>
>> Starting Registration
>> ExceptionObject caught !
>>
>> itk::ExceptionObject (0x1900fb0)
>> Location: "void itk::MattesMutualInformationImageToImageMetric<TFixedImage,
>> TMovingImage>::GetValueAndDerivative(typename
>> itk::ImageToImageMetric<TFixedImage, TMovingImage>::ParametersType&,
>> typename itk::ImageToImageMetric<TFixedImage, TMovingImage>::MeasureType&,
>> typename itk::ImageToImageMetric<TFixedImage,
>> TMovingImage>::DerivativeType&) const [with TFixedImage = main(int,
>> char**)::FixedImageType, TMovingImage = main(int, char**)::MovingImageType]"
>> File: /Users/InsightToolkit-
>> 3.10.0/Code/Algorithms/itkMattesMutualInformationImageToImageMetric.txx
>> Line: 1160
>> Description: itk::ERROR:
>> MattesMutualInformationImageToImageMetric(0x1900260): Fixed image marginal
>> PDF summed to zero
>>
>> I have increased the statistic until 30% and I get the same error.
>> Is it possible that BSpline Transformation is not suitable for binary images
>> registration?
>>
>> Any suggestion will be appreciate.
>>
>> Thanks.
>>
>> Serena.
>>
>>
>>
>>
>> _____________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.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
>>
>




More information about the Insight-users mailing list