[Insight-users] problem, how to invert b-spline transform

Hegenbart, Lars Lars.Hegenbart at hs.fzk.de
Tue Oct 14 11:27:05 EDT 2008


Dear ITK-community,

I am having trouble inverting a B-Spline-Transform.

The B-Spline-Transform "transform3" was set up before and works fine so
far. Now I want to compute the inverse transformation of it. The name I
choose is "transform3i":

	TransformType3::Pointer transform3i;
	transform3i = TransformType3::New(); // BSpline

	transform3i->SetGridSpacing(transform3->GetGridSpacing());
	transform3i->SetGridOrigin(transform3->GetGridOrigin());
	transform3i->SetGridRegion(transform3->GetGridRegion());

	typedef TransformType3::ParametersType ParametersType_bspline;
	const unsigned int numberOfParameters_bspline =
transform3i->GetNumberOfParameters();
	ParametersType_bspline
parameters_bspline(numberOfParameters_bspline);
	parameters_bspline.Fill( 0.0);
	transform3i->SetParameters(parameters_bspline);

	transform3->GetInverse(transform3i);

The problem now is: "transform3i"'s parameters contains only zeros,
which cannot be, since "transform3" has parameters not equal to zero. 

Somehow "GetInverse" does not work for B-Splines. I successfully tested
it for affine transformation (same code, without the SetGrid-stuff,
setting just the Identity with "SetIdentity"). The affine inverse
transform can be calculated.

Any ideas?

Thanks for any hints in advance!

Best regards
Lars



More information about the Insight-users mailing list