[IGSTK-Developers] IGSTK transform
Zein Salah
zeinsalah at gmail.com
Thu Feb 24 09:44:32 EST 2011
Dear all,
I am trying to to define a calibration tranfrom for a tracker tool. I
noticed a strange effect. I first defined the transform using the
"SetTranslationAndRotation" method, giving the translation and quaternion as
input for the method as follows:
usProbe_CalibrationTransform2.SetTranslationAndRotation( trans, versor, 0,
igstk::TimeStamp::GetLongestPossibleTime() );
trackerTool_2->SetCalibrationTransform(usProbe_CalibrationTransform);
The program works but the calibration transform is not not really accurate (
there is a deviation in the rotation), so I used another method to compute
calibration tranfrom, which generates a matrix (not translation&quaternion)
and tried to feed the matrix into the IGSTK::tranform using the
"ImportTransform". It seems that the result is NOT valid. To test if the the
InportTransform really takes effect, I tried the following code. It just
reads the matrix from a WORKING igstk transfrom and feeds it into another
igstk transform. As follows:
PrintMatrix("US Probe2", &usProbe_CalibrationTransform2); //
usProbe_CalibrationTransform2 was working as a tranfor but the result is not
correct
vtkSmartPointer<vtkMatrix4x4> mat = vtkSmartPointer<vtkMatrix4x4>::New();
usProbe_CalibrationTransform2.ExportTransform(*mat.GetPointer() );
usProbe_CalibrationTransform.ImportTransform(*mat.GetPointer() );
trackerTool_2->SetCalibrationTransform(usProbe_CalibrationTransform);
In this case, the usProbe_CalibrationTransform does not seems to be correct.
Any idea if something is missing?
Thanks,
Zein
On Mon, Feb 7, 2011 at 4:38 PM, Ziv Yaniv <zivy at isis.georgetown.edu> wrote:
> Hi Zein,
>
> To initialize a transform using a matrix call the
> Transform::ImportTransform() method.
>
> To set an "infinite" validity use itk::NumericTraits<
> TimeStamp::TimePeriodType >::max() [see igstkRigidTransformXMLFileReader.cxx
> - ln. 63].
>
> Also, it looks like the ImportTransform function has a logical bug, we
> don't require the time. Will log this as a bug and fix it shortly.
>
> regards
> Ziv
>
> On 2/7/2011 10:17 AM, Zein Salah wrote:
>
> Hello,
>
> I have two questions about igstk::transform
>
> 1. Is it possible to initialize (or set ) a transform with a transformation
> matrix?
>
> 2. Is it possible to define a transform who never expires druring the life
> time of the program? e.g a tool calibration transfrom?
>
> Thanks,
> Zein
>
>
> _______________________________________________
> IGSTK-Developers mailing listIGSTK-Developers at public.kitware.comhttp://public.kitware.com/cgi-bin/mailman/listinfo/igstk-developers
>
>
>
> --
> Ziv Yaniv, PhD., Research Assistant Professor
> Imaging Science and Information Systems (ISIS) Center
> Department of Radiology
> Georgetown University Medical Center
> 2115 Wisconsin Avenue, Suite 603
> Washington, DC, 20007,
>
> Phone: +1-202-6877286
> Fax: +1-202-784-3479
> email: zivy at isis.georgetown.edu
> web: http://isiswiki.georgetown.edu/zivy/
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/igstk-developers/attachments/20110224/1462a4ec/attachment-0001.html>
More information about the IGSTK-Developers
mailing list