[IGSTK-Users] State machine error in Landmark3DRegistration

Andinet Enquobahrie andinet.enqu at kitware.com
Mon Jan 25 09:46:49 EST 2010


Vincent-

Thanks for reporting the issue.

You are right. The call for SelectInitialState() method is redundant.

I have checked in a fix to CVS.

http://public.kitware.com/cgi-bin/viewcvs.cgi/Source/igstkLandmark3DRegistration.cxx?root=IGSTK&r1=1.24&r2=1.25

Andinet

On Tue, Jan 19, 2010 at 6:31 AM, Vincent Gratsac
<vincent.gratsac at irisa.fr> wrote:
> Hi all,
>
> Our application uses the Landmark3DRegistration class. A critical errar
> occurs when trying to reset it (by calling RequestReset()) :
>
>> 2010 janv. 19 11:20:13  :    (CRITICAL) In class Landmark3DRegistration
>> Error: attempt to invoke SelectInitialState()  but the machine is ready to
>> go  There is no reason for invoking SelectInitialState() after
>>  SetReadyToRun(). Something should be wrong in the logic of your state
>> machine programming.
>
> When looking at the igstLandmark3DRegistration.cxx file, there is a call to
> SelectInitialState() which should probably not be there.
>>
>> /* The "ResetRegsitration" method empties the landmark point
>> containers to start the process again */
>> void Landmark3DRegistration::ResetRegistrationProcessing()
>> {
>>  igstkLogMacro( DEBUG, "igstk::Landmark3DRegistration::"
>>                 "ResetRegistrationProcessing called...\n");
>>
>>  //Empty the image and tracker landmark containers
>>  while( m_ImageLandmarks.size() > 0 )
>>    {
>>    m_ImageLandmarks.pop_back();
>>    }
>>  while( m_TrackerLandmarks.size() > 0 )
>>    {
>>    m_TrackerLandmarks.pop_back();
>>    }
>>
>>  //Reset the transform
>>  TransformType::ParametersType parameters (
>> m_Transform->GetNumberOfParameters() );
>>
>>  parameters[0] = 0.0;
>>  parameters[1] = 0.0;
>>  parameters[2] = 1.0;
>>  parameters[3] = 0.0;
>>  parameters[4] = 0.0;
>>  parameters[5] = 0.0;
>>
>>  m_Transform->SetParameters( parameters );
>>    m_StateMachine.SelectInitialState( m_IdleState );
>> }
>
> I think that this is a bug, but fortunately, it has no impact on the use of
> this class.
>
> Regards,
>
> Vincent Gratsac
>
>
>
> _______________________________________________
> 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
>



-- 
Andinet Enquobahrie, Ph.D.
Kitware, Inc. - North Carolina Office
http://www.kitware.com
(919) 969-6990 x311



More information about the IGSTK-Users mailing list