[IGSTK-Users] Pivot Calibration events problems.
Fabian Torres
fabian.trobles at gmail.com
Mon Jan 14 11:57:47 EST 2013
Hi all.
Im trying to ise the igstk::PivotCalibration class. Im using the
igstkPivotCalibratioFLTKWidget class as a guideline.
The problem I have is that I do not receive some calibration events. I get
the following events:
igstk::PivotCalibration::InitializationFailureEvent()
igstk::PivotCalibration::InitializationSuccessEvent()
igstk::PivotCalibration::DataAcquisitionStartEvent()
After the InitializationSuccessEvent I use
pivotCalibration->RequestComputeCalibration();
and receive a DataAcquisitionStartEvent, but after that I do not get any
event. I do not receive
a DataAcquisitionEvent, DataAcquisitionEndEvent, CalibrationSuccessEvent
or CalibrationFailureEvent.
This is my callback function for events
void NeedleCalibration::OnCalibrationEvent( itk::Object * caller, const
itk::EventObject & event )
{
std::cout<<"OnCalibrationEvent"<<std::endl;
if(dynamic_cast< const
igstk::PivotCalibration::DataAcquisitionStartEvent * > (&event) )
{
std::cout<<"Data Acquisition Started"<<std::endl;
}
else if(dynamic_cast< const
igstk::PivotCalibration::DataAcquisitionEvent * > (&event) )
{
std::cout<<"Data Acquisition"<<std::endl;
}
else if( dynamic_cast<
const igstk::PivotCalibration::DataAcquisitionEndEvent * > (&event) )
{
std::cout<<"Data Acquisition Ended"<<std::endl;
}
else if(dynamic_cast<
const igstk::PivotCalibration::CalibrationFailureEvent * > (&event) )
{
std::cout<<"Calibration failed"<<std::endl;
}
else if( dynamic_cast<
const igstk::PivotCalibration::CalibrationSuccessEvent * > (&event) )
{
std::cout<<"Calibration Succed"<<std::endl;
}
}
And this are my observers
typedef itk::MemberCommand<NeedleCalibration> CalibrationObserverType;
this->m_CalibrationObserver = CalibrationObserverType::New();
this->m_CalibrationObserver->SetCallbackFunction(this,
&NeedleCalibration::OnCalibrationEvent );
pivotCalibration->AddObserver(igstk::PivotCalibration::DataAcquisitionStartEvent(),
this->m_CalibrationObserver );
pivotCalibration->AddObserver(igstk::PivotCalibration::DataAcquisitionEvent(),
this->m_CalibrationObserver );
pivotCalibration->AddObserver(igstk::PivotCalibration::DataAcquisitionEndEvent(),this->m_CalibrationObserver
);
pivotCalibration->AddObserver(igstk::PivotCalibration::CalibrationSuccessEvent(),this->m_CalibrationObserver
);
pivotCalibration->AddObserver(igstk::PivotCalibration::CalibrationFailureEvent(),this->m_CalibrationObserver
);
My tracker is in tracking state
Can anyone help me with this problem
Thanks for your time
--
Fabián Torres Robles
Maestria en Ciencias en Ingeniería Electrónica
Ingeniería en Sistemas Electrónicos
tel. 58081280, 0445534661338
e-mail fabian.trobles at gmail.com, dae.wong at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/igstk-users/attachments/20130114/5206e084/attachment-0001.html>
More information about the IGSTK-Users
mailing list