//-----------------------------------------------------------------
void ShowNPoints::Process()
{
- if (mwxwidget!=NULL)
+ if (_mwxwidget!=NULL)
{
- mwxwidget->SetImage( bbGetInputImage() );
+ _mwxwidget->SetImage( bbGetInputImage() );
// mwxwidget->SetRenderer( bbGetInputRenderer() );
- mwxwidget->SetReferencePoint( bbGetInputIn() );
- mwxwidget->SetColour( bbGetInputColour() );
+ _mwxwidget->SetReferencePoint( bbGetInputIn() );
+ _mwxwidget->SetColour( bbGetInputColour() );
// mwxwidget->SetOpacity( bbGetInputOpacity() );
- mwxwidget->SetRadio( bbGetInputRadio() );
- if ( backOpacity!=bbGetInputOpacity() )
+ _mwxwidget->SetRadio( bbGetInputRadio() );
+ if ( _backOpacity!=bbGetInputOpacity() )
{
- backOpacity = bbGetInputOpacity();
- mwxwidget->SetOpacity( bbGetInputOpacity() );
+ _backOpacity = bbGetInputOpacity();
+ _mwxwidget->SetOpacity( bbGetInputOpacity() );
} // if backOpacity
- // if (firsttime==true)
- // {
- // firsttime=false;
- if (onshowwidget==true)
+ if (_onshowwidget==true)
{
- mwxwidget->SetRenderer( bbGetInputRenderer() );
- if ( mwxwidget->GetModelShowNPoints()->GetFirstTime()==false )
+ _mwxwidget->SetRenderer( bbGetInputRenderer() );
+ if ( _mwxwidget->GetModelShowNPoints()->GetFirstTime()==false )
{
- mwxwidget->DetectCollectionActive();
+ _mwxwidget->DetectCollectionActive();
}
- if ( mwxwidget->GetModelShowNPoints()->GetFirstTime()==true )
+ if ( _mwxwidget->GetModelShowNPoints()->GetFirstTime()==true )
{
- mwxwidget->GetModelShowNPoints()->SetFirstTime(false);
- mwxwidget->SetInitLstPoints( bbGetInputInitLstPointsX() , bbGetInputInitLstPointsY() , bbGetInputInitLstPointsZ() , bbGetInputInitLstLabels() , bbGetInputInitLstIndexs() );
+ _mwxwidget->GetModelShowNPoints()->SetFirstTime(false);
+ _mwxwidget->SetInitLstPoints( bbGetInputInitLstPointsX() , bbGetInputInitLstPointsY() , bbGetInputInitLstPointsZ() , bbGetInputInitLstLabels() , bbGetInputInitLstIndexs() );
}
} // if onshowwidget
- // } // firsttime OJO machete Eduardo pour ANDREAS a verificar
- mwxwidget->AutoAddPoints();
- mwxwidget->TrackingPoint();
- bbSetOutputlstPointsX( mwxwidget->GetLstPointsX() );
- bbSetOutputlstPointsY( mwxwidget->GetLstPointsY() );
- bbSetOutputlstPointsZ( mwxwidget->GetLstPointsZ() );
- bbSetOutputlstLabels( mwxwidget->GetLstLabels() );
- bbSetOutputlstIndexs( mwxwidget->GetLstIndexs() );
- bbSetOutputlstSelectedIndexs( mwxwidget->GetLstSelectedIndexs() );
- bbSetOutputWidgetShowNPoints( (WidgetShowNPoints*)mwxwidget );
+ _mwxwidget->AutoAddPoints();
+ _mwxwidget->TrackingPoint();
+ bbSetOutputlstPointsX( _mwxwidget->GetLstPointsX() );
+ bbSetOutputlstPointsY( _mwxwidget->GetLstPointsY() );
+ bbSetOutputlstPointsZ( _mwxwidget->GetLstPointsZ() );
+ bbSetOutputlstLabels( _mwxwidget->GetLstLabels() );
+ bbSetOutputlstIndexs( _mwxwidget->GetLstIndexs() );
+ bbSetOutputlstSelectedIndexs( _mwxwidget->GetLstSelectedIndexs() );
+ bbSetOutputWidgetShowNPoints( (WidgetShowNPoints*)_mwxwidget );
} // mwxwidget
}
//-----------------------------------------------------------------
void ShowNPoints::CreateWidget(wxWindow* parent)
{
- mwxwidget = new WidgetShowNPointsBox( parent, this, bbGetInputType() );
- bbSetOutputWidget( mwxwidget );
+ _mwxwidget = new WidgetShowNPointsBox( parent, this, bbGetInputType() );
+ bbSetOutputWidget( _mwxwidget );
}
//-----------------------------------------------------------------
void ShowNPoints::OnShowWidget()
{
- onshowwidget=true;
+ _onshowwidget=true;
// mwxwidget->SetInitLstPoints( bbGetInputInitLstPointsX() , bbGetInputInitLstPointsY() , bbGetInputInitLstPointsZ() , bbGetInputInitLstLabels() , bbGetInputInitLstIndexs() );
}
//-----------------------------------------------------------------
void ShowNPoints::bbUserSetDefaultValues()
{
- onshowwidget= false;
- firsttime = true;
- backOpacity = -1;
- mwxwidget = NULL;
+ _onshowwidget= false;
+ _firsttime = true;
+ _backOpacity = -1;
+ _mwxwidget = NULL;
bbSetInputRadio(10);
bbSetInputOpacity(1);
std::vector<double> colour;
//-------------------------------------------------------------
void bbwxMaracas_N_ViewersWidget::OnRefreshView(wxCommandEvent & event)
{
- /*
- //EED2024-12-23 Refresh syncronisation (maracasvisu and bbtk)
- wxMaracas_N_ViewersWidget::OnRefreshView(event);
- if ( (backX!=(int)GetX()) || (backY!=(int)GetY()) || (backZ!=(int)GetZ()) )
- {
- backX = GetX();
- backY = GetY();
- backZ = GetZ();
- mbbViewerNV->_point.clear();
- mbbViewerNV->_point.push_back( (int)GetX() );
- mbbViewerNV->_point.push_back( (int)GetY() );
- mbbViewerNV->_point.push_back( (int)GetZ() );
- mbbViewerNV->bbSetOutputPoint( mbbViewerNV->_point );
-
- //ED2024-11-01
- bool ok=true;
- if (mbbViewerNV->bbGetInputReactivityType()==0) { ok=false; }
- mbbViewerNV->bbSignalOutputModification(std::string("Point"),ok);
-// if (mbbViewerNV->bbGetInputReactivityType()==1)
-// {
-// mbbViewerNV->bbSignalOutputModification(std::string("Point"),true);
-// } // if type
- } // if X Y Z
- */
+ if (mbbViewerNV->_onshowwidget==true)
+ {
+ //EED2024-12-23 Refresh syncronisation (maracasvisu and bbtk)
+ wxMaracas_N_ViewersWidget::OnRefreshView(event);
+ if ( (backX!=(int)GetX()) || (backY!=(int)GetY()) || (backZ!=(int)GetZ()) )
+ {
+ backX = GetX();
+ backY = GetY();
+ backZ = GetZ();
+ mbbViewerNV->_point.clear();
+ mbbViewerNV->_point.push_back( (int)GetX() );
+ mbbViewerNV->_point.push_back( (int)GetY() );
+ mbbViewerNV->_point.push_back( (int)GetZ() );
+ mbbViewerNV->bbSetOutputPoint( mbbViewerNV->_point );
+
+ //ED2024-11-01
+ bool ok=true;
+ if (mbbViewerNV->bbGetInputReactivityType()==0) { ok=false; }
+ mbbViewerNV->bbSignalOutputModification(std::string("Point"),ok);
+ // if (mbbViewerNV->bbGetInputReactivityType()==1)
+ // {
+ // mbbViewerNV->bbSignalOutputModification(std::string("Point"),true);
+ // } // if type
+ } // if X Y Z
+ } // if _onshowwidget
}
//-------------------------------------------------------------
// when window is shown
void ViewerNV::OnShowWidget()
{
- if (bbGetOutputWidget()!=NULL)
+ if (_mwxwidget!=NULL)
{
- bbGetOutputWidget()->Layout();
+ _onshowwidget = true;
+ _mwxwidget->Layout();
} // if bbGetOutputWidget
}
//-------------------------------------------------------------
void ViewerNV::bbUserSetDefaultValues()
{
+ _onshowwidget = false;
_currentimg = NULL;
_mwxwidget = NULL;
bbSetInputIn(NULL);