[IGSTK-Users] igstk::QView and registration applications

Torleif Sandnes torleif.sandnes at sintef.no
Mon May 14 07:50:49 EDT 2007


Hi.

I want to be able to do patient registration, and will ned a way to  
get image coordinates from user mouseclicks in my igstk::QView2D.
If I Understand Correctly, the Needlebiopsy example does this in  
DrawPickedPoint(const itk::Event& event), so I tried to do something  
like this:

1. In my class definition:
typedef itk::ReceptorMemberCommand<Self> ObserverType;
ObserverType::Pointer mTransformObserver;

2. In my class constructor:
mTransformObserver = ObserverType::New();
mTransformObserver->SetCallbackFunction(this,  
&MyClass::handleTransformEvent);

3. After loading a Dicom image and showing it in an igstk::QView2D:
mAxialViewWidget->AddObserver(igstk::TransformModifiedEvent(),  
mTransformObserver);

4. Finally, I created the function MyClass:handleTransformEvent():
void MyClass::handleTransformEvent(const itk::EventObject& event)
{
     cout << "Transform event received: ";
}

Unfortunately, I fail to see any output from this function.

Am I entirely off the rails with this approach?
Is there a(n) (IGSTK) way to accomplish this?

Regards,
Torleif Sandnes
Sintef Health Research



More information about the IGSTK-Users mailing list