[Insight-users] computing MattesMutualInformation on full images
Lilla Zollei
lillazollei at yahoo.com
Mon May 14 14:02:20 EDT 2007
Hi,
I am trying to add a code segment to a 2D pairwise
registration code that would compute MI on the full
images. I am using CenteredRigid2DTransform and
MattesMutualInformationImageToImageMetric and I
believe I am not initializing the metric correctly as
I always get an error at the GetValue statement. Now
that I set the FixedImageRegion, I get a bizarre error
that complains about a BSplines problem when I am not
even using such a warp....Can you help?
BTW, the image region is:
ImageRegion (0x7498d8)
Dimension: 2
Index: [0, 0]
Size: [1313, 1313]
and the transformation parameters are:
[-0.000147353, 0, 0, 0.00934701, 0.0151205]
So these both seem to be reasonable.
Thanks, Lilla
>>>>
EvaluationMetricType::Pointer eval_metric =
EvaluationMetricType::New();
eval_metric->UseAllPixelsOn();
eval_metric->SetNumberOfHistogramBins( 64 );
eval_metric->SetFixedImage( m_fixed );
eval_metric->SetMovingImage(m_moving);
eval_metric->SetFixedImageRegion(m_fixed->GetBufferedRegion());
eval_metric->Initialize();
double value = eval_metric->GetValue(
transform->GetParameters() );
>>>>
Exception caught :
itk::ExceptionObject (0x74c9d0)
Location: "void
itk::BSplineDeformableTransform<TScalarType,
NDimensions, VSplineOrder>::SetParameters(const
typename itk::Transform<TScalarType, NDimensions,
NDimensions>::ParametersType&) [with TScalarType =
double, unsigned int NDimensions = 2u, unsigned int
VSplineOrder = 3u]"
File:
/usr/pubsw/packages/itk/3.0.0/InsightToolkit-3.0.0/Code/Common/itkBSplineDeformableTransform.txx
Line: 266
Description: itk::ERROR:
BSplineDeformableTransform(0x7471f0): Mismatched
between parameters size 5 and region size 0
____________________________________________________________________________________Get the free Yahoo! toolbar and rest assured with the added security of spyware protection.
http://new.toolbar.yahoo.com/toolbar/features/norton/index.php
More information about the Insight-users
mailing list