-333.693930:-87.639621:-900.000000
FIN_BOX
BOX
-wx:ButtonSelectFilesDirectory:Box52
-ISEXEC:FALSE
--424.946739:18.218955:-900.000000
--395.146739:15.718955:-900.000000
-PORT
-Label:"Read .mhd"
-FIN_BOX
-BOX
vtk:MetaImageReader:Box53
ISEXEC:FALSE
--439.937827:4.474274:-900.000000
--417.477827:1.974274:-900.000000
+-359.018805:-24.910953:-900.000000
+-336.558805:-27.410953:-900.000000
FIN_BOX
BOX
creaMaracasVisu:ColorLayerImageView:Box54
PORT
TypeControlsInterface:"2"
PORT
+lstBaseColor:"0 0 0 1 1 0"
+PORT
+lstGreyLevelBoundaries:"0 128 256"
+PORT
lstTransparenceBoundaries:"0"
FIN_BOX
BOX
BOX
std:ConcatStrings:Box102
ISEXEC:FALSE
--296.237448:88.437715:-900.000000
--273.477448:85.937715:-900.000000
+-295.693747:83.725640:-900.000000
+-272.933747:81.225640:-900.000000
PORT
In1:"start /b "
FIN_BOX
BOX
std:MultipleInputs:Box117
ISEXEC:FALSE
--373.321430:16.060843:-900.000000
--351.241430:13.560843:-900.000000
+-375.858701:14.248506:-900.000000
+-353.778701:11.748506:-900.000000
FIN_BOX
BOX
std:ConcatStrings:Box120
PORT
Type:"1"
FIN_BOX
-CONNECTIONS:113
+BOX
+std:ConcatStrings:Box122
+ISEXEC:FALSE
+-345.507935:-17.289218:-900.000000
+-322.747935:-19.789218:-900.000000
+PORT
+In2:"/contour-tmp2-Imge.mhd"
+FIN_BOX
+CONNECTIONS:114
CONNECTION
Box08:Widget:widget:widget
NumberOfControlPoints:0
Box40:Widget:Box81:Widget4
NumberOfControlPoints:0
CONNECTION
-Box52:Out:Box53:In
-NumberOfControlPoints:0
-CONNECTION
Box64:Out:Box54:WxVtkBaseView
NumberOfControlPoints:0
CONNECTION
Box69:Out:Box54:WxVtkBaseView2
NumberOfControlPoints:0
CONNECTION
-Box52:BoxChange:Box56:BoxExecute
-NumberOfControlPoints:0
-CONNECTION
Box97:Out:Box60:In
NumberOfControlPoints:0
CONNECTION
Box88:Widget:Box49:Widget2
NumberOfControlPoints:0
CONNECTION
-Box52:Widget:Box50:Widget3
-NumberOfControlPoints:0
-CONNECTION
Box91:Widget:Box50:Widget2
NumberOfControlPoints:0
CONNECTION
CONNECTION
Box108:BoxChange:Box94:BoxExecute
NumberOfControlPoints:0
+CONNECTION
+Box94:BoxChange:Box53:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box105:Out:Box122:In1
+NumberOfControlPoints:0
+CONNECTION
+Box122:Out:Box53:In
+NumberOfControlPoints:0
+CONNECTION
+Box94:BoxChange:Box56:BoxExecute
+NumberOfControlPoints:0
APP_END
new wx:LayoutLine Box50
-new wx:ButtonSelectFilesDirectory Box52
- set Box52.Label "Read .mhd"
-
new vtk:MetaImageReader Box53
new creaMaracasVisu:ColorLayerImageView Box54
set Box54.ColorBarPosition "-100 -100"
set Box54.TypeControlsInterface "2"
+ set Box54.lstBaseColor "0 0 0 1 1 0"
+ set Box54.lstGreyLevelBoundaries "0 128 256"
set Box54.lstTransparenceBoundaries "0"
new vtk:BinaryOperations Box56
new std:ConcatStrings_tool Box121
set Box121.Type "1"
+new std:ConcatStrings Box122
+ set Box122.In2 "/contour-tmp2-Imge.mhd"
+
connect Box66.Out Box11.Renderer
connect Box35.Out Box68.In
connect Box43.Widget Box44.Widget2
connect Box49.Widget Box81.Widget1
connect Box40.Widget Box81.Widget4
-connect Box52.Out Box53.In
connect Box64.Out Box54.WxVtkBaseView
connect Box65.Out Box54.WxVtkBaseView1
connect Box69.Out Box54.WxVtkBaseView2
-connect Box52.BoxChange Box56.BoxExecute
connect Box97.Out Box60.In
connect Box60.Out Box56.In2
connect Box56.Out Box61.In
connect Box89.Widget Box88.Widget2
connect Box90.Widget Box88.Widget3
connect Box88.Widget Box49.Widget2
-connect Box52.Widget Box50.Widget3
connect Box91.Widget Box50.Widget2
connect Box77.Widget Box82.Widget4
connect Box42.Widget Box77.Widget2
connect Box121.BoxChange Box117.In2
connect Box108.BoxChange Box117.In6
connect Box108.BoxChange Box94.BoxExecute
+connect Box94.BoxChange Box53.BoxExecute
+connect Box105.Out Box122.In1
+connect Box122.Out Box53.In
+connect Box94.BoxChange Box56.BoxExecute
# Complex input ports
input mesh Box67.In " "
{
// Widget interface
// askPointLabel = new wxStaticText(panel, -1, _T("Label:")); // JPR
- textCtrl = new wxTextCtrl(panel, -1, wxEmptyString , wxDefaultPosition, sizeButton);
+ textCtrl = new wxTextCtrl(panel, -1, wxEmptyString , wxDefaultPosition, sizeButton);
+ wxButton *btnBackPoint = new wxButton( panel, -1, _T("<") , wxDefaultPosition, sizeButton );
+ wxButton *btnNextPoint = new wxButton( panel, -1, _T(">") , wxDefaultPosition, sizeButton );
+ wxButton *btnAddPoint = new wxButton( panel, -1, _T("+") , wxDefaultPosition, sizeButton );
+ wxButton *btnInsertPoint = new wxButton( panel, -1, _T("(+)") , wxDefaultPosition, sizeButton );
cbAutoAddPoints = new wxCheckBox(panel,-1, _T("Auto") , wxDefaultPosition, sizeButton );
- wxButton *btnAddPoint = new wxButton( panel, -1, _T("+") , wxDefaultPosition, sizeButton );
- wxButton *btnInsertPoint = new wxButton( panel, -1, _T("(+)") , wxDefaultPosition, sizeButton );//CFT
- wxButton *btnSetPositionPoint = new wxButton( panel, -1, _T("Set") , wxDefaultPosition, sizeButton );
+ wxButton *btnMovePointUp = new wxButton( panel, -1, _T("<-") , wxDefaultPosition, sizeButton );
+ wxButton *btnMovePointDown = new wxButton( panel, -1, _T("->") , wxDefaultPosition, sizeButton );
+
+ wxButton *btnSetPositionPoint = new wxButton( panel, -1, _T("Set") , wxDefaultPosition, sizeButton );
cbTrackPoint = new wxCheckBox(panel,-1, _T("Tra.") , wxDefaultPosition, sizeButton );
wxButton *btnRenamePoint = new wxButton( panel, -1, _T("Ren.") , wxDefaultPosition, sizeButton );
wxButton *btnErasePoint = new wxButton( panel, -1, _T("-") , wxDefaultPosition, sizeButton );
wxButton *btnSavePoints = NULL;
wxButton *btnLoadPoints = NULL;
- cbAutoAddPoints -> SetToolTip( _T("Auto Add point") );
- btnAddPoint -> SetToolTip( _T("+ Add point") );
- btnInsertPoint -> SetToolTip( _T("(-) Insert point") );
- btnErasePoint -> SetToolTip( _T("- Erase point") );
- btnEraseLastPoint -> SetToolTip( _T("- lst Erase last point") );
- btnDeleteAllPoints -> SetToolTip( _T("-- Erase all points") );
+
+ btnBackPoint -> SetToolTip( _T("Select befor point") );
+ btnNextPoint -> SetToolTip( _T("Select next point") );
+ cbAutoAddPoints -> SetToolTip( _T("Auto Add point") );
+ btnAddPoint -> SetToolTip( _T("+ Add point") );
+ btnInsertPoint -> SetToolTip( _T("(-) Insert point") );
+ btnMovePointUp -> SetToolTip( _T("Move point Up in the normal direction") );
+ btnMovePointDown -> SetToolTip( _T("Move point Down in the normal direction") );
+
+ btnErasePoint -> SetToolTip( _T("- Erase point") );
+ btnEraseLastPoint -> SetToolTip( _T("- lst Erase last point") );
+ btnDeleteAllPoints -> SetToolTip( _T("-- Erase all points") );
if ( mtype==0 )
{
Connect(sdrRadio->GetId() , wxEVT_COMMAND_SLIDER_UPDATED , (wxObjectEventFunction) &WidgetShowNPoints::UpdatePoints);
} // if mtype 0 3
Connect(cbAutoAddPoints->GetId() , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &WidgetShowNPoints::OnAutoAddPoints);
+ Connect(btnBackPoint->GetId() , wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &WidgetShowNPoints::OnBackPoint);
+ Connect(btnNextPoint->GetId() , wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &WidgetShowNPoints::OnNextPoint);
Connect(btnAddPoint->GetId() , wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &WidgetShowNPoints::OnAddPoint);
Connect(btnInsertPoint->GetId() , wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &WidgetShowNPoints::OnInsertPoint);//CFT
Connect(btnSetPositionPoint->GetId(), wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &WidgetShowNPoints::OnSetPoint);
Connect(btnRedo->GetId() , wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &WidgetShowNPoints::OnRedo);
wxFlexGridSizer *sizer0 = new wxFlexGridSizer(1);
wxFlexGridSizer *sizer1 = new wxFlexGridSizer(2);
- wxFlexGridSizer *sizer2 = new wxFlexGridSizer(2);
+ wxFlexGridSizer *sizer2 = new wxFlexGridSizer(3);
wxFlexGridSizer *sizer3 = new wxFlexGridSizer(2);
- wxFlexGridSizer *sizer4 = new wxFlexGridSizer(2);
+ wxFlexGridSizer *sizer4 = new wxFlexGridSizer(3);
wxFlexGridSizer *sizer5 = new wxFlexGridSizer(2);
+ wxFlexGridSizer *sizer6 = new wxFlexGridSizer(2);
+ wxFlexGridSizer *sizer7 = new wxFlexGridSizer(2);
sizer1->Add( textCtrl );
sizer1->Add( btnRenamePoint );
- sizer2->Add( cbAutoAddPoints );
- sizer2->Add( new wxStaticText(panel, -1, _T(" ")) );
+ // sizer2->Add( cbAutoAddPoints );
+ // sizer2->Add( new wxStaticText(panel, -1, _T(" ")) );
sizer2->Add( btnAddPoint );
sizer2->Add( btnInsertPoint );//CFT
+ sizer2->Add( cbAutoAddPoints );
sizer3->Add( btnSetPositionPoint );
sizer3->Add( cbTrackPoint );
sizer4->Add( btnErasePoint );
sizer4->Add( btnDeleteAllPoints );
sizer5->Add( btnUndo );
sizer5->Add( btnRedo );
-// sizer0->Add(askPointLabel); // JPR
+ sizer6->Add( btnBackPoint );
+ sizer6->Add( btnNextPoint );
+ sizer7->Add( btnMovePointUp );
+ sizer7->Add( btnMovePointDown );
+
+ // sizer0->Add(askPointLabel); // JPR
sizer0->Add(txtNrPoints);
+ sizer0->Add(sizer6);
sizer0->Add(sizer2);
- sizer0->Add(sizer1);
+ sizer0->Add(sizer7);
sizer0->Add(sizer3);
sizer0->Add(sizer4);
+ sizer0->Add(sizer1);
sizer0->Add(sizer5);
if ( (mtype==0) || (mtype==3) )
{
*/
+void WidgetShowNPoints::SetCurrentPoint(int idCurrentPoint )
+{
+ int size = GetModelShowNPoints()->GetLstPointsSize();
+ if (idCurrentPoint<0) { idCurrentPoint = size-1; }
+ if (idCurrentPoint>=size ) { idCurrentPoint = 0; }
+ GetModelShowNPoints()->SetIdCurrentPoint( idCurrentPoint );
+ RefreshCollectionText();
+ RefreshColourCollection();
+}
+
+void WidgetShowNPoints::OnBackPoint(wxCommandEvent &event)
+{
+ SetCurrentPoint( GetModelShowNPoints()->GetIdCurrentPoint() + 1 );
+}
+
+void WidgetShowNPoints::OnNextPoint(wxCommandEvent &event)
+{
+ SetCurrentPoint( GetModelShowNPoints()->GetIdCurrentPoint() - 1 );
+}
+
+
//------------------------------------------------------------------------
void WidgetShowNPoints::AddPoint(double x, double y, double z, std::string label)
{
i=50; x=(c1LstXX[i]+c2LstXX[i])/2; y=(c1LstYY[i]+c2LstYY[i])/2; z=(c1LstZZ[i]+c2LstZZ[i])/2; AddPoint(x,y,z,"");
i=75; x=(c1LstXX[i]+c2LstXX[i])/2; y=(c1LstYY[i]+c2LstYY[i])/2; z=(c1LstZZ[i]+c2LstZZ[i])/2; AddPoint(x,y,z,"");
i=sc-1;x=(c1LstXX[i]+c2LstXX[i])/2; y=(c1LstYY[i]+c2LstYY[i])/2; z=(c1LstZZ[i]+c2LstZZ[i])/2; AddPoint(x,y,z,"");
+
+ RefreshCollectionText();
+ RefreshColourCollection();
+
+
} // if size of c1LstX c2LstX
} // if c1 && c2
mActualCollection--;
if ( mActualCollection <0 )
{
- mActualCollection=0;
+// mActualCollection=0;
+ mActualCollection = lstModelShowNPoints.size()-1;
} //if <=0
RefreshCollectionText();
RefreshColourCollection();
mActualCollection++;
if ( mActualCollection >=lstModelShowNPoints.size() )
{
- mActualCollection = lstModelShowNPoints.size()-1;
- } //if <=0
+// mActualCollection = lstModelShowNPoints.size()-1;
+ mActualCollection = 0;
+ } //if mActualCollection >= size
RefreshCollectionText();
RefreshColourCollection();
StopTrackPoint();