[Insight-users] VersorRigid3DTransform

Radhika Sivaramakrishna Radhika Sivaramakrishna" <radshashi at earthlink.net
Wed, 31 Dec 2003 11:21:08 -0800


Hi Luis,
I was trying to use the VersorRigid3DTransform to artificially transform a
given image by 10 degrees about the center of the image only in the
X-direction (ie no rotation in Y and Z) and no translation either. I am
doing this to get a better understanding of this transform because I will
need to use it to register a large number of unknown cases. Unfortunately, I
am running into some problems.
I modified the example in ImageRegistration8.cxx to do this.

Here is what I did:

I read in the fixed and moving image (in my case both are from the same
file). Since no registration is required this time, I only defined a
Transform of type VersorRigid3DTransform.

I then set the finalparameters of my transform directly in the following
way:

TransformType::ParametersType finalParameters;



  finalParameters[0] = 0.174532;
  finalParameters[1] = 0;
  finalParameters[2] = 0;
  finalParameters[3] = 128.0;
  finalParameters[4] = 128.0;
  finalParameters[5] = 82;
  finalParameters[6] = 0;
  finalParameters[7] = 0;
  finalParameters[8] = 0;

since I want a 10 degree rotation in X, my image is of size 256x256x164.

I then did the usual resampling and casting to create my final image.
However a memory error is reported when I try to set the finalParameters
directly. Can you tell me what the problem is?

Is there a better way of artificially creating a known transformation?

Also, when I get to the actual image registration stage, what is the best
optimizer for this transform? Is it the VersorTransformOptimizer?

Thanks
Radhika