[Insight-users] Curves3DExtractor

Karthik Krishnan Karthik.Krishnan at kitware.com
Fri Jan 27 13:30:17 EST 2006


Yes, I did have issues with the GUI not updating itself unless I 
reloaded the volume. I did not get a change to look closely at why this 
was happening. I'll do so when I get a chance.

Atwood, Robert C wrote:

> 
>Karthik and ITK peopel:
>This  Curves3DExtractor is a great application and nearly what I wanted
>to do anyways , but I am having one frustrating problem with the
>interface. 
>
>Once an image is sent through the pipleine, and a spacial function
>selected with the frustrum selector, I can get some points. However, no
>matter how much I then change the controls of the spatial function
>selector, the extracted point set remains the same. I have clicked on
>all the available buttons , but none of them updates. I have looked in
>the code but I cannot so far  figure out where the spatial function
>filter actually gets the information from the widget, 
>
Here's a hunch though :

Take a look at lines 136 and lines 102
http://www.itk.org/cgi-bin/viewcvs.cgi/Curves3DExtractor/ceExtractorConsole.cxx?annotate=1.5&root=InsightApplications

All communication for updates happens via the Command/Observers (There's 
ample description about this in the SW guide).

  m_ParametricSpaceViewer.GetNotifier()->AddObserver( fltk::GlDrawEvent(),
                  m_SpatialFunctionControl->GetDrawCommand() );

Here the spatialFunctionControl's DrawCommand is going to observe the 
ParametricSpaceViewer. In other words, every time an 
ParametricSpaceViewer invokes an fltk::GLDrawEvent(), the 
SpatialFunctionControl responds with its Execute method.

Similearly:
  m_ParametricSpaceViewer.GetNotifier()->AddObserver(
                         fltk::GlDrawEvent(),
                         m_ParametricSpaceSamplesShape->GetDrawCommand() );

I did see that the shape never gets redrawn unless the volume is reloaded..

Specifically the spatial function's callback is in lines 37 and 238
http://www.itk.org/cgi-bin/viewcvs.cgi/Auxiliary/FltkImageViewer/fltkFrustumFunctionControl.txx?annotate=1.5&root=InsightApplications

and its GUI is in
http://www.itk.org/cgi-bin/viewcvs.cgi/Auxiliary/FltkImageViewer/fltkFrustumFunctionControlGUI.fl?rev=1.2&root=InsightApplications&view=log

You might want to have debug messages and see if all callbacks are 
invoked correctly when you change the parameters.. Its a pretty long chain:

1. SpatialFunctionControl observes the ParametricSpaceViewer (must 
redraw on it if the widget changes)
2. ExtractedParametricSpaceViewer observes the SpatialFunctionControl
3. ExtractedParametricSpaceViewer observes the parametric point set
.....

Thanks
karthik

>due to my
>ignorance of all things GUI. So I am stuck with whatever frustum I have
>selected the first time. Does it not do this for you? I updated the ITK
>and ITK_apps CVS today by the way so it should be latest CVS version. 
>
>Thanks for any help
>Robert
>
>
>
>  
>


More information about the Insight-users mailing list