[Fwd: Re: [IGSTK-Users] Landmark3DRegistration::computeRMSError()]

Andinet Enquobahrie andinet.enqu at kitware.com
Wed Jul 18 08:55:03 EDT 2007



-------- Original Message --------
Subject: 	Re: [IGSTK-Users] Landmark3DRegistration::computeRMSError()
Date: 	Wed, 18 Jul 2007 08:04:31 -0400
From: 	Andinet Enquobahrie <andinet.enqu at kitware.com>
To: 	Torleif Sandnes <torleif.sandnes at sintef.no>
References: 	<9839711A-8DE1-4839-8100-3F6E0625474D at sintef.no>



Hi Torleif,

> Hi.
> I would like to compute the RMS error of a landmark registration, but  
> it seems the method is protected even though the doxygen-generated  
> documentation states that it is public.
>
> Why is computeRMSError() protected? (Should it follow the request/ 
> observe pattern?)
> Shouldn't there be a way to get to the RMS error without subclassing  
> Landmark3DRegistration?
> Is there a problem with the doxygen-generated documentation?

You are right. The documentation is wrong.  It seems like their is a 
problem in the generation of the
nightly doxygen documentation. It is not up-to-date. I will look into it.

To access the RMS error, you have to invoke RequestGetRMSError() method 
and set up an observer to
receive the event loaded with the RMS error.

Take a look at how it is done in igstkLandmarkRegistrationTest2.cxx.

Here is a code snippet that shows how to set up an observer and access 
the error value

 // Setup an obsever to get the RMS error
 Landmark3DRegistrationGetRMSErrorCallback::Pointer lRmscb2 =
                           
Landmark3DRegistrationGetRMSErrorCallback::New();

 landmarkRegister2->AddObserver( igstk::DoubleTypeEvent(), lRmscb2 );
 landmarkRegister2->RequestGetRMSError();

 if( !lRmscb2->GetEventReceived() )
   {
   std::cerr << "LandmarkRegsistration class failed to throw a event "
             << "containing the RMS error " << std::endl;
   return EXIT_FAILURE;
   }

 std::cout << "RMS error= " << lRmscb2->GetRMSError() << std::endl;

------------------------------

-Andinet







>
> Thanks,
> Torleif
> _______________________________________________
> IGSTK-Users mailing list
> IGSTK-Users at public.kitware.com
> http://public.kitware.com/cgi-bin/mailman/listinfo/igstk-users
>


-- 
==========================================================
Andinet A. Enquobahrie, PhD
R&D Engineer
Kitware Inc.

28 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-371-3971 x124
www.kitware.com





-- 
==========================================================
Andinet A. Enquobahrie, PhD
R&D Engineer
Kitware Inc.

28 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-371-3971 x124
www.kitware.com





More information about the IGSTK-Users mailing list