[IGSTK-Users] Transform reader example

Ziv Yaniv zivy at isis.imac.georgetown.edu
Fri Nov 20 10:00:35 EST 2009


Hi Alberto,

To obtain the transform from the "transformData" object you need to 
first invoke:

transformData->RequestTransform();

The standard IGSTK approach is to have an observer for this request, and 
then get the data from the observer. In the reader example the following 
line will work for rigid transformation.

igstk::Transform  *myRigidTransform = dynamic_cast<igstk::Transform *> 
(transformObserver->GetTransformRequest());

To actually get the data we use dynamic_cast to ensure that we perform a 
valid downcast.

           regards
                  Ziv


alberto.vaccarella at mail.polimi.it wrote:
> Hello,
> 
> I've looked at the transform reader example but there is something I 
> don't get. In the example the transform is read from the xml file and 
> just printed to screen: what if I wanted to store it in a 
> igstk::Transform object?
> I tried with:
> 
> igstk::Transform transform = Observer->GetTransformRequest();
> 
> but this method returns a pointer to an igstk::TransformBase object; I 
> tried casting it but the compiler (Visual studio 8) didn't like it...
> Can u help me please?
> 
> Thanks
> 
> Alberto
> 
> _______________________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at 
> http://www.kitware.com/opensource/opensource.html
> 
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/cgi-bin/mailman/listinfo/igstk-users
> 
> 


-- 
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-687-7286
Fax: +1-202-784-3479
email: zivy at isis.georgetown.edu
web: http://isiswiki.georgetown.edu/zivy/



More information about the IGSTK-Users mailing list