1 /*# ---------------------------------------------------------------------
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
5 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
6 # Previous Authors : Laurent Guigues, Jean-Pierre Roux
7 # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
9 # This software is governed by the CeCILL-B license under French law and
10 # abiding by the rules of distribution of free software. You can use,
11 # modify and/ or redistribute the software under the terms of the CeCILL-B
12 # license as circulated by CEA, CNRS and INRIA at the following URL
13 # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
14 # or in the file LICENSE.txt.
16 # As a counterpart to the access to the source code and rights to copy,
17 # modify and redistribute granted by the license, users are provided only
18 # with a limited warranty and the software's author, the holder of the
19 # economic rights, and the successive licensors have only limited
22 # The fact that you are presently reading this means that you have had
23 # knowledge of the CeCILL-B license and that you accept its terms.
24 # ------------------------------------------------------------------------ */
27 #include "wxPanelCuttingImageData.h"
29 //-------------------------------------------------------------------
31 #include <vtkProperty.h>
32 #include <vtkTextProperty.h>
33 #include <vtkProperty2D.h>
34 //-------------------------------------------------------------------
35 //-------------------------------------------------------------------
37 wxPanelCuttingImageData::wxPanelCuttingImageData (wxWindow *parent)
38 : wxPanel( parent, -1)
41 _histogrammeVector = NULL;
42 _wxvtk3Dbaseview = NULL;
43 _wxvtkbaseView = NULL;
46 Create3DViewObjects();
49 //-------------------------------------------------------------------
50 wxPanelCuttingImageData::~wxPanelCuttingImageData()
56 delete _modelCylinder;
58 _vtksphere -> Delete();
59 _vtkcylinder -> Delete();
60 _cubeMapper -> Delete();
61 _sphereMapper -> Delete();
62 _cylinderMapper -> Delete();
63 _cubeActor -> Delete();
64 _sphereActor -> Delete();
65 _cylinderActor -> Delete();
66 // _xyplot->RemoveAllInputs();
68 _histogrammeVector->Delete();
69 _renplotter->Delete();
71 if(_wxvtkbaseView!=NULL){
72 delete _wxvtkbaseView;
74 //delete _vtkclipping3Ddataviewer;
81 //-------------------------------------------------------------------
82 void wxPanelCuttingImageData::RemoveActors()
84 _wxvtk3Dbaseview->GetRenderer()->RemoveActor( _actualActor );
88 //-------------------------------------------------------------------
89 void wxPanelCuttingImageData::SetWxVtk3DBaseView( wxVtk3DBaseView * wxvtk3Dbaseview )
91 _wxvtk3Dbaseview=wxvtk3Dbaseview;
94 //-------------------------------------------------------------------
96 void wxPanelCuttingImageData::SetVtkClipping3DDataViewer( vtkClipping3DDataViewer *vtkclipping3Ddataviewer )
98 this->_vtkclipping3Ddataviewer = vtkclipping3Ddataviewer;
101 //-------------------------------------------------------------------
102 void wxPanelCuttingImageData::Create3DViewObjects()
105 _vtksphere = vtkSphereSource::New();
106 _vtksphere->SetThetaResolution (20);
107 _vtksphere->SetPhiResolution (20);
108 _sphereMapper = vtkPolyDataMapper::New();
109 _sphereMapper->SetInput( _vtksphere->GetOutput() );
110 _sphereActor = vtkActor::New();
111 _sphereActor->SetMapper(_sphereMapper);
112 _sphereActor->SetOrigin(0, 0, 0);
113 _sphereActor->SetPosition(0, 0, 0);
114 _sphereActor->GetProperty()->SetColor(1, 0, 0);
115 _sphereActor->SetUserTransform( _modelSphere->GetVtkTransform() );
118 _vtkcube = vtkCubeSource::New();
119 _vtkcube->SetXLength (1);
120 _vtkcube->SetYLength (1);
121 _vtkcube->SetZLength (1);
122 _cubeMapper = vtkPolyDataMapper::New();
123 _cubeMapper->SetInput( _vtkcube->GetOutput() );
124 _cubeActor = vtkActor::New();
125 _cubeActor->SetMapper(_cubeMapper);
126 _cubeActor->SetOrigin(0, 0, 0);
127 _cubeActor->SetPosition(0, 0, 0);
128 _cubeActor->GetProperty()->SetColor(1, 0, 0);
129 _cubeActor->SetUserTransform( _modelCube->GetVtkTransform() );
132 _vtkcylinder = vtkCylinderSource::New();
133 _vtkcylinder->SetResolution(20);
134 _cylinderMapper = vtkPolyDataMapper::New();
135 _cylinderMapper->SetInput( _vtkcylinder->GetOutput() );
136 _cylinderActor = vtkActor::New();
137 _cylinderActor->SetMapper(_cylinderMapper);
138 _cylinderActor->SetOrigin(0, 0, 0);
139 _cylinderActor->SetPosition(0, 0, 0);
140 _cylinderActor->GetProperty()->SetColor(1, 0, 0);
141 _cylinderActor->SetUserTransform( _modelCylinder->GetVtkTransform() );
146 //-------------------------------------------------------------------
147 void wxPanelCuttingImageData::CreateModel()
149 _modelCube = new figureCuttingCubeModel();
150 _modelSphere = new figureCuttingSphereModel();
151 _modelCylinder = new figureCuttingCylinderModel();
153 // _modelCube->SetVtkTransform( _modelCube->GetVtkTransform() );
154 // _modelSphere->SetVtkTransform( _modelSphere->GetVtkTransform() );
155 // _modelCylinder->SetVtkTransform( _modelCylinder->GetVtkTransform() );
158 //-------------------------------------------------------------------
160 void wxPanelCuttingImageData::InitHistogramme()
163 if (_imageData==NULL)
167 _imageData->GetScalarRange(rangeA);
169 _xyplot->RemoveAllInputs();
171 if ( _histogrammeVector!=NULL )
173 _histogrammeVector -> Delete();
176 _histogrammeVector = vtkImageData::New();
177 _histogrammeVector -> SetDimensions ( (int)(rangeA[1]),1,1 );
178 _histogrammeVector -> SetScalarTypeToUnsignedShort();
179 _histogrammeVector -> AllocateScalars();
180 _histogrammeVector -> Update();
182 unsigned short *p_vol = (unsigned short*)_histogrammeVector->GetScalarPointer(0,0,0);
183 int i,size = (int) (rangeA[1]);
184 for (i=0; i < size; i++)
189 _xyplot->SetXRange(0, rangeA[1]);
190 _xyplot->SetYRange(0, 10);
191 _xyplot->AddInput( _histogrammeVector );
194 //-------------------------------------------------------------------
195 wxWindow *wxPanelCuttingImageData::CreatePlotHistogrammeInterface()
197 _xyplot = vtkXYPlotActor::New();
199 _xyplot->GetPositionCoordinate()->SetValue(0.00, 0.00, 0);
200 _xyplot->GetPosition2Coordinate()->SetValue(1.0, 1.00, 0); //relative to Position
201 _xyplot->SetXValuesToArcLength();
202 _xyplot->SetNumberOfXLabels(6);
204 _xyplot->SetTitle("Histogramme");
205 _xyplot->SetXTitle("Gray level");
206 _xyplot->SetYTitle("Occurrences ");
207 _xyplot->GetProperty()->SetColor(1, 0, 0);
208 _xyplot->GetProperty()->SetPointSize(2);
209 vtkTextProperty *tprop = _xyplot->GetTitleTextProperty();
210 tprop->SetColor( 1,0,1 );
212 _xyplot->SetAxisTitleTextProperty(tprop);
213 _xyplot->SetAxisLabelTextProperty(tprop);
214 _xyplot->PlotPointsOn();
215 _xyplot->GetProperty()->SetPointSize(3);
217 _wxvtkbaseView = new wxVtkBaseView(this);
218 _wxvtkbaseView->Configure();
220 _renplotter = vtkRenderer::New();
221 vtkRenderWindow *renWin = _wxvtkbaseView->GetRenWin();
222 renWin->AddRenderer( _renplotter );
223 _renplotter->AddActor2D( _xyplot );
225 return _wxvtkbaseView->GetWxVTKRenderWindowInteractor();
228 //-------------------------------------------------------------------
230 void wxPanelCuttingImageData::CreateInterface()
233 wxBoxSizer *topsizer = new wxBoxSizer(wxVERTICAL); // Principal sizer
235 wxBoxSizer *sizerH0 = new wxBoxSizer(wxHORIZONTAL ); // type of segmentation figure
236 wxBoxSizer *sizerH2 = new wxBoxSizer(wxHORIZONTAL ); // scale
237 wxBoxSizer *sizerH3 = new wxBoxSizer(wxHORIZONTAL ); // rotation
238 wxBoxSizer *sizerH4 = new wxBoxSizer(wxHORIZONTAL ); // intern extern
239 wxBoxSizer *sizerH5 = new wxBoxSizer(wxHORIZONTAL ); // Isovalue
240 wxBoxSizer *sizerH6 = new wxBoxSizer(wxHORIZONTAL ); // Buttons
241 wxFlexGridSizer *sizerH7 = new wxFlexGridSizer(2 ); // Volumic information
244 _typeFig = new wxChoice(this,-1);
245 _opacityFig = new wxSlider(this,-1,100,0,100, wxDefaultPosition, wxSize(200,45), wxSL_HORIZONTAL | wxSL_LABELS);
247 _scaleX = new wxSlider(this,-1,6,0,500 , wxDefaultPosition, wxSize(200,45), wxSL_HORIZONTAL | wxSL_LABELS);
248 _scaleY = new wxSlider(this,-1,20,0,500 , wxDefaultPosition, wxSize(200,45), wxSL_HORIZONTAL | wxSL_LABELS);
249 _scaleZ = new wxSlider(this,-1,7,0,500 , wxDefaultPosition, wxSize(200,45), wxSL_HORIZONTAL | wxSL_LABELS);
251 _rotationX = new wxSlider(this,-1,0,-360,360, wxDefaultPosition, wxSize(200,45), wxSL_HORIZONTAL | wxSL_LABELS);
252 _rotationY = new wxSlider(this,-1,0,-360,360, wxDefaultPosition, wxSize(200,45), wxSL_HORIZONTAL | wxSL_LABELS);
253 _rotationZ = new wxSlider(this,-1,0,-360,360, wxDefaultPosition, wxSize(200,45), wxSL_HORIZONTAL | wxSL_LABELS);
255 _volIntern = new wxRadioButton(this,-1, _T("Volume intern " ));
256 _volExtern = new wxRadioButton(this,-1, _T("Volume extern " ));
258 _histogrammeAccumulated = new wxCheckBox(this,-1,_T("Histogramme accumulated"));
260 _isoValue = new wxSlider(this,-1, 200, 0,2000, wxDefaultPosition, wxSize(200,45), wxSL_HORIZONTAL | wxSL_LABELS);
261 _valueBeforeIsoValue = new wxSlider(this,-1,-1,-1,2000, wxDefaultPosition, wxSize(200,45), wxSL_HORIZONTAL | wxSL_LABELS);
262 _valueAfterIsoValue = new wxSlider(this,-1,-1,-1,2000, wxDefaultPosition, wxSize(200,45), wxSL_HORIZONTAL | wxSL_LABELS);
264 wxButton *btnExtract = new wxButton(this, -1,_T("Extract"));
266 _infoToVo = new wxStaticText(this,-1,_T("########################"));
267 _infoSuVoA = new wxStaticText(this,-1,_T("############"));
268 _infoSuVo = new wxStaticText(this,-1,_T("############"));
269 _infoPixLe = new wxStaticText(this,-1,_T("############"));
270 _infoPixHi = new wxStaticText(this,-1,_T("############"));
275 _typeFig->Append(_T("Cylindre"));
276 _typeFig->Append(_T("Cube"));
277 _typeFig->Append(_T("Sphere"));
278 _typeFig->SetSelection(0);
279 _volIntern->SetValue(true);
281 Connect(_typeFig->GetId() , wxEVT_COMMAND_CHOICE_SELECTED , (wxObjectEventFunction) &wxPanelCuttingImageData::OnTypeFig );
283 Connect(_opacityFig->GetId() , wxEVT_COMMAND_SLIDER_UPDATED , (wxObjectEventFunction) &wxPanelCuttingImageData::OnOpacityFig );
284 Connect(_rotationX->GetId() , wxEVT_COMMAND_SLIDER_UPDATED , (wxObjectEventFunction) &wxPanelCuttingImageData::OnTransform );
285 Connect(_rotationY->GetId() , wxEVT_COMMAND_SLIDER_UPDATED , (wxObjectEventFunction) &wxPanelCuttingImageData::OnTransform );
286 Connect(_rotationZ->GetId() , wxEVT_COMMAND_SLIDER_UPDATED , (wxObjectEventFunction) &wxPanelCuttingImageData::OnTransform );
287 Connect(_scaleX->GetId() , wxEVT_COMMAND_SLIDER_UPDATED , (wxObjectEventFunction) &wxPanelCuttingImageData::OnTransform );
288 Connect(_scaleY->GetId() , wxEVT_COMMAND_SLIDER_UPDATED , (wxObjectEventFunction) &wxPanelCuttingImageData::OnTransform );
289 Connect(_scaleZ->GetId() , wxEVT_COMMAND_SLIDER_UPDATED , (wxObjectEventFunction) &wxPanelCuttingImageData::OnTransform );
290 Connect(btnExtract->GetId() , wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &wxPanelCuttingImageData::OnExtract );
293 // wxStaticText *text=new wxStaticText(this,-1, " ");
295 sizerH0 -> Add( new wxStaticText(this,-1, _T("Fig. Type: "),wxDefaultPosition, wxSize(50,20)) ,1,wxALL ,0);
296 sizerH0 -> Add( _typeFig ,1,wxALL ,0);
297 sizerH0 -> Add( _opacityFig ,1,wxALL|wxEXPAND ,0);
299 sizerH2 -> Add( new wxStaticText(this,-1,_T("Scale : ")) ,1,wxALL ,0);
300 sizerH2 -> Add( _scaleX ,1,wxALL | wxEXPAND ,0 );
301 sizerH2 -> Add( _scaleY ,1,wxALL | wxEXPAND ,0 );
302 sizerH2 -> Add( _scaleZ ,1,wxALL | wxEXPAND ,0 );
304 sizerH3 -> Add( new wxStaticText(this,-1,_T("Rotation : ")) ,1,wxALL ,0);
305 sizerH3 -> Add( _rotationX ,1,wxALL | wxEXPAND ,0 );
306 sizerH3 -> Add( _rotationY ,1,wxALL | wxEXPAND ,0 );
307 sizerH3 -> Add( _rotationZ ,1,wxALL | wxEXPAND ,0 );
310 sizerH4 -> Add( new wxStaticText(this,-1,_T("Intern / Extern : ")) ,1,wxALL ,0);
311 sizerH4 -> Add( _volIntern ,1,wxALL ,0);
312 sizerH4 -> Add( new wxStaticText(this,-1, _T(" ")) ,1,wxALL ,0);
313 sizerH4 -> Add( _volExtern ,1,wxALL ,0);
315 sizerH5 -> Add( new wxStaticText(this,-1,_T("Isovalue ")) ,1,wxALL ,0);
316 sizerH5 -> Add( _isoValue ,1,wxALL | wxEXPAND ,0 );
317 sizerH5 -> Add( _valueBeforeIsoValue ,1,wxALL | wxEXPAND ,0 );
318 sizerH5 -> Add( _valueAfterIsoValue ,1,wxALL | wxEXPAND ,0 );
320 sizerH6 -> Add( new wxStaticText(this,-1, _T(" ")) ,1,wxALL ,0);
321 sizerH6 -> Add( btnExtract ,1,wxALL ,0);
323 sizerH7 -> Add( new wxStaticText(this,-1,_T("Total Volume: "), wxDefaultPosition, wxSize(200,12)) , 1 , wxALL ,0);
324 sizerH7 -> Add( _infoToVo , 1 , wxALL ,0);
325 sizerH7 -> Add( new wxStaticText(this,-1,_T("SubVolume: "), wxDefaultPosition, wxSize(200,12) ) , 1 , wxALL ,0);
326 sizerH7 -> Add( _infoSuVo , 1 , wxALL ,0);
327 sizerH7 -> Add( new wxStaticText(this,-1,_T("SubVolume (ana.): "), wxDefaultPosition, wxSize(200,12)) , 1 , wxALL ,0);
328 sizerH7 -> Add( _infoSuVoA , 1 , wxALL ,0);
329 sizerH7 -> Add( new wxStaticText(this,-1,_T("Pix < isovalue: ") , wxDefaultPosition, wxSize(200,12)) , 1 , wxALL ,0);
330 sizerH7 -> Add( _infoPixLe , 1 , wxALL ,0);
331 sizerH7 -> Add( new wxStaticText(this,-1,_T("Pix > isovalue: "), wxDefaultPosition, wxSize(200,12)) , 1 , wxALL ,0);
332 sizerH7 -> Add( _infoPixHi , 1 , wxALL ,0);
333 // sizerH7 -> SetMinSize(300, 120);
336 topsizer -> Add( sizerH0 ,1,wxALL|wxEXPAND ,0);
339 topsizer -> Add( sizerH2 ,1,wxALL|wxEXPAND ,0);
342 topsizer -> Add( sizerH3 ,1,wxALL|wxEXPAND ,0);
345 topsizer -> Add( sizerH4 ,1,wxALL ,0);
349 topsizer -> Add( sizerH5 ,1,wxALL |wxEXPAND ,0);
352 topsizer -> Add( sizerH6 , 1 , wxALL ,0);
355 topsizer -> Add( _histogrammeAccumulated ,1, wxALL ,0);
357 // Volumic information
358 topsizer -> Add( sizerH7 , 1 , wxALL|wxEXPAND ,0);
362 // wxBoxSizer *sizerHor = new wxBoxSizer(wxHORIZONTAL);
363 wxBoxSizer *sizerHor = new wxBoxSizer(wxVERTICAL);
364 sizerHor -> Add( topsizer , 1 , wxALL | wxEXPAND ,0);
367 wxWindow *panelPlotHistogramme = CreatePlotHistogrammeInterface();
368 sizerHor -> Add( panelPlotHistogramme , 1 , wxGROW ,0);
371 this->SetAutoLayout(true);
372 this->SetSizer( sizerHor );
375 // this->FitInside();
378 //-------------------------------------------------------------------
380 void wxPanelCuttingImageData::OnExtract(wxCommandEvent& event)
387 unsigned short *pOrg;
388 unsigned short *p_histogramme;
391 long int contAfter = 0;
392 long int contBefor = 0;
394 double min=999999999;
395 double max=-999999999;
397 volExt=_volExtern->GetValue();
398 volInt=_volIntern->GetValue();
399 int isoValue = _isoValue->GetValue();
400 int valueBeforeIsoValue = _valueBeforeIsoValue->GetValue();
401 int valueAfterIsoValue = _valueAfterIsoValue ->GetValue();
404 p_histogramme = (unsigned short*)_histogrammeVector->GetScalarPointer(0,0,0);
406 _imageData->GetDimensions(dim);
407 _imageData->GetSpacing(spc);
408 _actualCuttingModel->CalculeInversMatrix();
410 for (xx=0;xx<dim[0]; xx++)
412 for (yy=0;yy<dim[1]; yy++)
414 for (zz=0;zz<dim[2];zz++)
416 inside=_actualCuttingModel->IfPointInside(xx,yy,zz);
417 if ( ((inside==true)&&(volInt==true)) || ((!inside==true)&&(volExt==true)) )
419 pOrg=(unsigned short*)_imageData->GetScalarPointer (xx,yy,zz);
421 if ((*pOrg)<isoValue)
424 if (valueBeforeIsoValue!=-1)
426 *pOrg=valueBeforeIsoValue;
430 if (valueAfterIsoValue!=-1)
432 *pOrg=valueAfterIsoValue;
436 p_histogramme[*pOrg]++;
437 if (*pOrg<min) min=*pOrg;
438 if (*pOrg>max) max=*pOrg;
452 double volumeUnit = spc[0]*spc[1]*spc[2];
453 long int totalSubVolume = contBefor + contAfter;
454 double contBeforPorc = 100*(double)contBefor/(double)totalSubVolume;
455 double contAfterPorc = 100*(double)contAfter/(double)totalSubVolume;
456 infoToVo.Printf(_T("%dx%dx%d = %d"),dim[0],dim[1],dim[2], dim[0]*dim[1]*dim[2] );
457 infoSuVo.Printf(_T("%ld") , totalSubVolume);
458 infoSuVoA.Printf(_T("%.2f"), _actualCuttingModel->GetTheoricVolume() );
459 infoPixLe.Printf(_T("%ld pix. (%.2f %s) - %.2f mm^3"),contBefor, contBeforPorc ,_T("%"),contBefor*volumeUnit);
460 infoPixHi.Printf(_T("%ld pix. (%.2f %s) - %.2f mm^3"),contAfter, contAfterPorc ,_T("%"),contAfter*volumeUnit);
462 _infoToVo->SetLabel(infoToVo);
463 _infoSuVo->SetLabel(infoSuVo);
464 _infoSuVoA->SetLabel(infoSuVoA);
465 _infoPixLe->SetLabel(infoPixLe);
466 _infoPixHi->SetLabel(infoPixHi);
469 if ( _histogrammeAccumulated->GetValue()==true )
472 _histogrammeVector -> GetDimensions ( dimHist );
474 int i,size=dimHist[0];
475 for (i=1; i<=size; i++)
477 p_histogramme[i] = p_histogramme[i] + p_histogramme[i-1];
481 _histogrammeVector->Update();
482 _histogrammeVector->GetScalarRange(range);
483 _xyplot->SetYRange( 0 , range[1] );
484 _xyplot->SetXRange( min , max );
486 _vtkclipping3Ddataviewer->RefreshSurface();
487 _wxvtkbaseView->Refresh();
489 // _wxvtkbaseView->RefreshView();
490 wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121); // Refresh
491 //EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
492 #if wxMAJOR_VERSION <= 2
493 _wxvtkbaseView->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
495 _wxvtkbaseView->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
500 //-------------------------------------------------------------------
501 void wxPanelCuttingImageData::OnTypeFig(wxCommandEvent& event)
503 _wxvtk3Dbaseview->GetRenderer()->RemoveActor( _actualActor );
505 if (_typeFig->GetSelection()==0){
506 _actualCuttingModel=_modelCylinder;
507 _actualActor=_cylinderActor;
509 if (_typeFig->GetSelection()==1){
510 _actualCuttingModel=_modelCube;
511 _actualActor=_cubeActor;
513 if (_typeFig->GetSelection()==2){
514 _actualCuttingModel=_modelSphere;
515 _actualActor=_sphereActor;
517 _wxvtk3Dbaseview->GetRenderer()->AddActor( _actualActor );
522 //-------------------------------------------------------------------
523 void wxPanelCuttingImageData::RefreshOpacity()
525 double op= _opacityFig->GetValue()/100.0;
526 _actualActor->GetProperty()->SetOpacity( op );
529 //-------------------------------------------------------------------
530 void wxPanelCuttingImageData::OnOpacityFig(wxScrollEvent& event)
535 //-------------------------------------------------------------------
536 void wxPanelCuttingImageData::RefreshView()
538 SetParamsOfTransformation( );
541 //-------------------------------------------------------------------
542 void wxPanelCuttingImageData::Refresh()
544 _wxvtk3Dbaseview->Refresh();
547 //-------------------------------------------------------------------
548 void wxPanelCuttingImageData::SetParamsOfTransformation( )
551 vtkImageData *vtkimagedata = _vtkmprbasedata->GetImageData();
552 vtkimagedata->GetSpacing(spc);
553 int px = (int) (_vtkmprbasedata->GetX() );
554 int py = (int) (_vtkmprbasedata->GetY() );
555 int pz = (int) (_vtkmprbasedata->GetZ() );
556 int sx = (int) (_scaleX->GetValue() * spc[0] );
557 int sy = (int) (_scaleY->GetValue() * spc[1] );
558 int sz = (int) (_scaleZ->GetValue() * spc[2] );
559 _actualCuttingModel -> SetScale ( sx , sy , sz );
560 _actualCuttingModel -> SetPosition ( px , py , pz );
561 _actualCuttingModel -> SetRotation ( _rotationX->GetValue() , _rotationY->GetValue() , _rotationZ->GetValue() );
562 _actualCuttingModel -> SetSpacing ( spc[0] , spc[1] , spc[2] );
563 _actualCuttingModel -> CalculeMatrix();
566 //-------------------------------------------------------------------
568 void wxPanelCuttingImageData::OnTransform(wxScrollEvent& event)
573 //-------------------------------------------------------------------
574 void wxPanelCuttingImageData::SetVtkMPRBaseData( vtkMPRBaseData *vtkmprbasedata )
576 _vtkmprbasedata = vtkmprbasedata;
577 _imageData = _vtkmprbasedata->GetImageData();
580 //-------------------------------------------------------------------
582 void wxPanelCuttingImageData::Configure()
584 _actualCuttingModel=_modelCylinder;
585 _actualActor=_cylinderActor;
586 _wxvtk3Dbaseview->GetRenderer()->AddActor( _actualActor );
587 SetParamsOfTransformation();