[Insight-developers] [Fwd: Re: [Insight-users]
itkCurvatureRegistrationFilter]
Torsten Rohlfing
torsten at synapse.sri.com
Thu Aug 18 11:55:31 EDT 2005
Hi --
could someone please put the following fixes that came up on the
itk-users list into the CVS repository.
The first adds a trivial access method needed to get the mean squares
registration function to work with the curvature registration filter.
The second fixes a template instantiation/compilation error with VC++.
Thank you!
Torsten
Index: Code/Algorithms/itkMeanSquareRegistrationFunction.h
===================================================================
RCS file: /cvsroot/Insight/Insight/Code/Algorithms/itkMeanSquareRegistrationFunction.h,v
retrieving revision 1.5
diff -r1.5 itkMeanSquareRegistrationFunction.h
145a146,150
> /** Get the metric value. The metric value is the mean square difference
> * in intensity between the fixed image and transforming moving image
> * computed over the the overlapping region between the two images. */
> virtual double GetMetric() const
> { return this->GetEnergy(); }
Index: Code/Algorithms/itkCurvatureRegistrationFilter.h
===================================================================
RCS file: /cvsroot/Insight/Insight/Code/Algorithms/itkCurvatureRegistrationFilter.h,v
retrieving revision 1.1
diff -r1.1 itkCurvatureRegistrationFilter.h
132c132
< typedef Image<RealTypeDFT,TDeformationField::ImageDimension> DeformationFieldComponentImageType;
---
> typedef Image<RealTypeDFT,::itk::GetImageDimension<TDeformationField>::ImageDimension> DeformationFieldComponentImageType;
-------- Original Message --------
Subject: Re: [Insight-users] itkCurvatureRegistrationFilter
Date: Thu, 18 Aug 2005 08:51:55 -0700
From: Torsten Rohlfing <torsten at synapse.sri.com>
To: Martin Urschler <martin at urschler.info>
CC: insight-users at itk.org
References: <4303B67E.4090109 at synapse.sri.com>
<43045E05.5040609 at urschler.info>
Martin:
You are right again. Apply the following (trivial) patch:
Index: Code/Algorithms/itkMeanSquareRegistrationFunction.h
===================================================================
RCS file: /cvsroot/Insight/Insight/Code/Algorithms/itkMeanSquareRegistrationFunction.h,v
retrieving revision 1.5
diff -r1.5 itkMeanSquareRegistrationFunction.h
145a146,150
> /** Get the metric value. The metric value is the mean square difference
> * in intensity between the fixed image and transforming moving image
> * computed over the the overlapping region between the two images. */
> virtual double GetMetric() const
> { return this->GetEnergy(); }
I will also forward this to the developers list so someone with CVS
write access can put it into the repository.
As a final note, I myself typically use the
itk::FastSymmetricForcesDemonsRegistrationFunction class as the driving
force for the curvature-based registration.
Best,
Torsten
Martin Urschler wrote:
> hi torsten,
>
> your advice resolved my compilation problem, but there occurred
> another one when actually using the registration filter
>
> the meansquare registration function that you are using by default for
> computing the updates lacks the GetMetric method which leads to a
> compiler error
> are you using a different registration function? does it compile on
> your machine with the default one?
>
> thanks,
> Martin
>
> Torsten Rohlfing wrote:
>
>> Just a hunch - try replacing
>>
>> typedef Image<RealTypeDFT,TDeformationField::ImageDimension>
>> DeformationFieldComponentImageType;
>>
>> with
>>
>> typedef
>> Image<RealTypeDFT,::itk::GetImageDimension<TDeformationField>::ImageDimension>
>> DeformationFieldComponentImageType;
>>
>>
>> It seems that everyone except me used the latter version (or
>> itkGetStaticConstMacro()) to achieve the desired effect. If you have
>> problems compiling itkCurvatureRegistrationFilter but everything else
>> compiles fine, this may fix it.
>>
--
Torsten Rohlfing, PhD SRI International, Neuroscience Program
Research Scientist 333 Ravenswood Ave, Menlo Park, CA 94025
Phone: ++1 (650) 859-3379 Fax: ++1 (650) 859-2743
torsten at synapse.sri.com http://www.stanford.edu/~rohlfing/
"Though this be madness, yet there is a method in't"
--
Torsten Rohlfing, PhD SRI International, Neuroscience Program
Research Scientist 333 Ravenswood Ave, Menlo Park, CA 94025
Phone: ++1 (650) 859-3379 Fax: ++1 (650) 859-2743
torsten at synapse.sri.com http://www.stanford.edu/~rohlfing/
"Though this be madness, yet there is a method in't"
More information about the Insight-developers
mailing list