Hi Aida,
When the code references a class, you need to put the correct
namespace. In your code, you need to put the correct namespace in the two
places where you use the class SelectionToolWidget:
Core::Widgets::SelectionToolWidget* bboxWidget;
bboxWidget =
GetSelectionToolWidget<Core::Widgets::SelectionToolWidget>( "Bounding Box"
);
Best,
Xavi
From: Aida Ninyerola [mailto:[email protected]]
Sent: jueves, 28 de julio de 2011 15:02
To: [email protected]
Subject: [Gimias-developers] bounding box
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