[IGSTK-Developers] ObjectRepresentation Visibility

Patrick Cheng cheng at isis.georgetown.edu
Thu Feb 15 17:11:02 EST 2007


Hi Luis,

I have been complaining about this class for a long time. The visibility 
test does seem to past. But in real application, it doesn't work, I have 
been using local copy of the code to give the demo all the time, and 
this time, I really need to get your attention to fix this.

1.Issue:
a.In Needle Biopsy application, first when needle is visible, and turns 
invisible soon after the image is loaded (was given a short transform). 
When try to start tracking, the needle won’t show up.

b.In Needle Biopsy application, first when needle is visible (give a 
long valid transform), while it is tracking, block the view. The needle 
will disappear. When the view is restored, the needle won’t show up again.

c.Same thing happened to an ellipsoid object we placed in the view. When 
it is given a short transform at construction. It will become invisible 
at the beginning. When we click on image, it suppose to set a const 
transform to the ellipsoid, and the ellipsoid is suppose to appeared at 
that clicked point, but it won’t show up.


2.Test case
Try any of the above. Try c out if you don't have a tracker.


3.Solution
When I looked at the logger file of the representation class.

24460511760.254333  :    (DEBUG) State transition is being made : 
EllipsoidObjectRepresentation  PointerID 02F56F38 
ValidSpatialObjectAndInvisibleState(272)  with 
UpdateActorsPositionInput(264) ---> ValidTimeStampState(274).

Under this state: ValidTimeStampState; there is no Input will make the 
object visible again.

I changed the following code
Line 122:
igstkAddTransitionMacro( ValidTimeStamp, ValidTimeStamp,
                          ValidTimeStamp,  MakeObjectsVisible );
Line 144:
igstkAddTransitionMacro( InvalidTimeStamp, InvalidTimeStamp,
                          InvalidTimeStamp,  MakeObjectsInvisible );

These changes solve the current issue, but it might not be efficient.



4. Summary
The state machine for ObjectRepresentation is too complicated. It's 
hard to follow, especially, when we use macros and omit all the 'State' 
and 'Input' key words, and break the lines to comply to the KWStyle.

I have also attached the log file for both, Visibility test and 
NeedleBiopsy.


Thank you,

Patrick
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: visibilityLog.txt
URL: <http://public.kitware.com/pipermail/igstk-developers/attachments/20070215/fff1a299/attachment.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: logNeedleBiopsy.txt
URL: <http://public.kitware.com/pipermail/igstk-developers/attachments/20070215/fff1a299/attachment-0001.txt>


More information about the IGSTK-Developers mailing list