Hi,

I'm trying to activate the bounding box in my widget when the user selects a
button. I've taken by example the function "OnBtnRegion" of
coreDynProcessingWidget.cpp.
As I don't understand what does each part I don't know exactly what I need
for my widget.

The code I'm looking to is:
*
    if ( event.GetInt( ) )
    {
        StartInteraction( event.GetEventObject(), "Bounding Box" );
    }
    else
    {
        wxWindow* applyWin = m_DynPanel->FindWindowById( wxID_APPLY );
        applyWin->Enable( true );

        SelectionToolWidget* bboxWidget =
GetSelectionToolWidget<SelectionToolWidget>( "Bounding Box" );
        itk::ImageRegion<3> region;
        if ( Core::CastAnyProcessingData( bboxWidget->GetData( ), region ) )
        {
            std::ostringstream strRegion;
            strRegion << region.GetIndex( 0 ) << ",";
            strRegion << region.GetIndex( 1 ) << ",";
            strRegion << region.GetIndex( 2 ) << ",";
            strRegion << region.GetSize( 0 ) << ",";
            strRegion << region.GetSize( 1 ) << ",";
            strRegion << region.GetSize( 2 ) << std::ends;
            m_CurrentInteractionControl->SetValue( strRegion.str() );
        }

        bboxWidget->StopInteraction();
    }*

I think that I need the part I marked in bold letter but I get an error
telling that "SelectionToolWidget" it is an indetificator not delcared, even
changing the line for *Core::Widgets::SelectionToolWidget* bboxWidget =
GetSelectionToolWidget<SelectionToolWidget>( "Bounding Box" );*

Thank you very much,
Aida
------------------------------------------------------------------------------
Got Input?   Slashdot Needs You.
Take our quick survey online.  Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
_______________________________________________
Gimias-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gimias-developers

Reply via email to