[Insight-users] Strange problems with multiresolution

Ramón Casero Cañas ramon.casero at comlab.ox.ac.uk
Mon Jul 20 01:03:25 EDT 2009


Geoff Topping wrote:
> 
> From this, it seems that if you change the cost function of the
> optimizer, which is an image to image metric, the optimizer's
> m_PreviousGradient and m_Gradient will be unchanged until
> StartOptimization is called (which happens in the registration's
> StartRegistration function).  Since you're changing transforms
> anyway, these gradients would probably be misleading or problematic
> to use during the next optimization iteration, as well (since
> dimension 0 might be a translation in one transform, and a rotation
> or skew or something else entirely in another transform).
> 
> So, you probably need to start a new optimization when changing the
> transform, rather than continuing the same optimization while
> changing the cost functions between levels / iterations.  You could
> run the registration with one transform, get the results, and use
> them to initialize a new registration sequence with a new transform,
> rather than trying to change transforms between levels in the
> RegistrationInterfaceCommand functions.


Hi Geoff,

Thanks for your comments. I was having a similar problem, trying to 
change from TranslationTransform at level 0 to AffineTransform at  level 
1, and I was getting the run-time error

<SCREEN>
Error during translation registration:
/usr/local/include/InsightToolkit/Common/itkMatrixOffsetTransformBase.txx:389:
itk::ERROR: AffineTransform(0x7f8e747c3ba0): Error setting parameters: 
parameters array size (3) is less than expected  (NInputDimensions * 
NOutputDimensions + NOutputDimensions)  (3 * 3 + 3 = 12)
</SCREEN>

Even though I set the affine transform explicitly both in registration 
and metric

<CODE>
registration->SetTransform( affineTransform );
registration->GetMetric()->SetTransform( affineTransform );
</CODE>

(with only the former, the latter doesn't change the transform).

I have been trying, but I couldn't figure out how to change the 
transform from the RegistrationInterfaceCommand, so I'll follow your 
advice and run 2 registrations, one after the other.

However, the ITK Guide mentions that "In a typical registration 
scenario, a user will tweak component settings or even swap out com-
ponents between multi-resolution levels. For example, [...] Another 
possible scheme is to use a simple translation transform for the initial 
coarse registration and upgrade to an affine transform at the finer 
levels." (p. 381, sec. 8.7.1 Fundamentals, 8.7 Multi-Resolution 
Registration).

So it seems that there's a way of doing this from the 
RegistrationInterfaceCommand.

Does anybody know how to?

Cheers,

Ramon.

-- 
Ramón Casero Cañas, DPhil

Computational Biology, Computing Laboratory
University of Oxford
Wolfson Building, Parks Rd
Oxford OX1 3QD

tlf     +44 (0) 1865 610807
web     http://web.comlab.ox.ac.uk/people/Ramon.CaseroCanas
photos  http://www.flickr.com/photos/rcasero/


More information about the Insight-users mailing list