[Insight-users] Using different type of transfrom in MultiResolutionRegistration
Renji Yu
yurenji at gmail.com
Fri Mar 12 22:19:44 EST 2010
Dear All,
It is mentioned in the ItkSoftwareGuide (version2.4.0 8.7
Multi-ResolutionReigstration) that "another possible scheme is to use a
simple translation transform for the initial coarse registration and an
affine transform at the finer levels".
It means that in different levels, we will use different transformers:
Level 0:
typedef itk::TranslationTransform< double, Dimension > TransformType;
TransformType::Pointer transform = TransformType::New();
Level higher:
typedef itk::AffineTransform< double, 2 > TransformType1;
TransformType1::Pointer transform1 = TransformType1::New();
So I revised the MultiResImageRegistraion1.xx and the code is like this:
template <typename TRegistration>
class RegistrationInterfaceCommand : public itk::Command
{
if ( registration->GetCurrentLevel() == 0 )
{
//.
}
else
{
registration->SetTransform( transform1 );
}
//.
}
class CommandIterationUpdate : public itk::Command
{
//.
}
Int main()
{//.
registration->SetOptimizer( optimizer );
registration->SetTransform( transform );
//.
registration->StartRegistration();
}
I got the error message that "Description: itk::ERROR:
RegularStepGradientDescentOptimizer(022E64D0):
of Scales is 6, but the NumberOfParameters for the CostFunction is 2."
Obviously, parameters used to initialize optimizer are different at
different levels. I don't know how to solve this problem.
And I wonder how does the translation transform give its result to the next
level's affine transform.
If you have done this kind of registration before, please tell me how to
solve the problem.
Thanks a lot!
yurenji
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100313/88c7dd03/attachment.htm>
More information about the Insight-users
mailing list