#include <CutModelData.h>
Public Member Functions | |
CutModelData () | |
CutModelData (int id, vtkRenderWindowInteractor *interactor, vtkCommand *observer, vtkImageData *img) | |
~CutModelData () | |
void | initializeData (int id, vtkRenderWindowInteractor *interactor, vtkCommand *observer, vtkImageData *img) |
int | getId () |
void | changeOpacity (int opacity) throw ( CutModelException) |
void | ShowViewBox (bool check) throw ( CutModelException) |
void | ChangeShape (int selection) throw ( CutModelException) |
vtkActor * | getActor () throw ( CutModelException) |
vtkPolyData * | getPolyData () throw ( CutModelException) |
void | changeColor (double r, double g, double b) throw ( CutModelException) |
void | udapteActorDirection () throw ( CutModelException) |
void | ExecuteCut (double *range, bool isinside, vtkImageData *copyimage) throw ( CutModelException) |
void | ExecuteUnCut (bool isinside, vtkImageData *image, vtkImageData *copyimage) throw ( CutModelException) |
void | RefreshViewBox () |
vtkTransform * | getCurrentMatrix () |
int | getCurrentShape () |
void | setCurrentShape (int currentshape) |
void | setTransform (vtkTransform *transform, vtkImageData *img) throw ( CutModelException) |
Private Member Functions | |
void | checkInvariant () throw ( CutModelException) |
void | createBoxWidget (vtkRenderWindowInteractor *interactor, vtkCommand *observer) |
void | createActor () |
void | setTransform (vtkImageData *img) throw ( CutModelException) |
void | createShapes () |
CutModelFigure * | getCurentCuttingModel () |
vtkTransform * | getModelTransform (vtkImageData *copyimage) |
vtkTransform * | getModelTransformInvers () |
Private Attributes | |
vtkBoxWidget * | _boxWidgetVolume |
vtkPolyDataMapper * | _Mapper |
vtkActor * | _Actor |
int | _id |
int | _currentshape |
CutModelFigureCube * | _cubefigure |
CutModelFigureCylinder * | _cylinderfigure |
CutModelFigureSphere * | _spherefigure |
vtkTransform * | currentmatrix |
vtkTransform * | modeltransform |
vtkTransform * | inversModel |
Definition at line 42 of file CutModelData.h.
CutModelData::CutModelData | ( | ) |
Definition at line 27 of file CutModelData.cxx.
CutModelData::CutModelData | ( | int | id, | |
vtkRenderWindowInteractor * | interactor, | |||
vtkCommand * | observer, | |||
vtkImageData * | img | |||
) |
Start of the manager class
Definition at line 22 of file CutModelData.cxx.
References initializeData().
00022 { 00023 00024 initializeData(id, interactor, observer, img); 00025 }
CutModelData::~CutModelData | ( | ) |
Definition at line 41 of file CutModelData.cxx.
References _Actor, _boxWidgetVolume, _cubefigure, _cylinderfigure, _id, _Mapper, _spherefigure, checkInvariant(), currentmatrix, inversModel, and modeltransform.
00041 { 00042 checkInvariant(); 00043 _boxWidgetVolume->RemoveAllObservers(); 00044 _boxWidgetVolume->Off(); 00045 _boxWidgetVolume->SetInteractor(NULL); 00046 _boxWidgetVolume->Delete(); 00047 _Mapper->Delete(); 00048 _Actor->Delete(); 00049 delete _cubefigure; 00050 delete _cylinderfigure; 00051 delete _spherefigure; 00052 currentmatrix->Delete(); 00053 modeltransform->Delete(); 00054 inversModel->Delete(); 00055 _id = -1; 00056 }
void CutModelData::changeColor | ( | double | r, | |
double | g, | |||
double | b | |||
) | throw ( CutModelException) |
Definition at line 182 of file CutModelData.cxx.
Referenced by CutModelManager::changeColor().
00182 { 00183 checkInvariant(); 00184 _Actor->GetProperty()->SetColor( r,g,b ); 00185 }
void CutModelData::changeOpacity | ( | int | opacity | ) | throw ( CutModelException) |
Definition at line 127 of file CutModelData.cxx.
Referenced by CutModelManager::changeOpacity().
00127 { 00128 checkInvariant(); 00129 _Actor->GetProperty()->SetOpacity((double)opacity/100.0); 00130 }
void CutModelData::ChangeShape | ( | int | selection | ) | throw ( CutModelException) |
Definition at line 141 of file CutModelData.cxx.
Referenced by CutModelManager::ChangeShape(), and initializeData().
00141 { 00142 checkInvariant(); 00143 00144 if(selection == 0){ 00145 _Mapper->SetInput(_spherefigure->getPolyData()); 00146 }else if(selection == 1){ 00147 _Mapper->SetInput(_cylinderfigure->getPolyData()); 00148 }else if(selection == 2){ 00149 _Mapper->SetInput(_cubefigure->getPolyData()); 00150 }else{ 00151 throw CutModelException("Shape type not found"); 00152 } 00153 _currentshape=selection; 00154 }
void CutModelData::checkInvariant | ( | ) | throw ( CutModelException) [private] |
Definition at line 156 of file CutModelData.cxx.
References _Actor, _boxWidgetVolume, _cubefigure, _cylinderfigure, _Mapper, and _spherefigure.
Referenced by getActor(), getCurentCuttingModel(), initializeData(), udapteActorDirection(), and ~CutModelData().
00156 { 00157 if(_boxWidgetVolume==NULL){ 00158 throw CutModelException("Box Widget not created"); 00159 } 00160 if(_Mapper==NULL){ 00161 throw CutModelException("Mapper not created"); 00162 } 00163 if(_Actor==NULL){ 00164 throw CutModelException("Actor not created"); 00165 } 00166 if(_cubefigure==NULL){ 00167 throw CutModelException("Cube not created"); 00168 } 00169 if(_cylinderfigure==NULL){ 00170 throw CutModelException("Cylinder not created"); 00171 } 00172 if(_spherefigure==NULL){ 00173 throw CutModelException("Sphere not created"); 00174 } 00175 }
void CutModelData::createActor | ( | ) | [private] |
Definition at line 105 of file CutModelData.cxx.
References _Actor, and _Mapper.
Referenced by initializeData().
00105 { 00106 00107 _Mapper = vtkPolyDataMapper::New(); 00108 _Actor = vtkActor::New(); 00109 _Actor->SetMapper(_Mapper); 00110 _Actor->GetProperty()->SetColor(1, 0, 0); 00111 _Actor->GetProperty()->SetOpacity(0.5); 00112 }
void CutModelData::createBoxWidget | ( | vtkRenderWindowInteractor * | interactor, | |
vtkCommand * | observer | |||
) | [private] |
Definition at line 61 of file CutModelData.cxx.
References _boxWidgetVolume.
Referenced by initializeData().
00061 { 00062 _boxWidgetVolume = vtkBoxWidget::New(); 00063 _boxWidgetVolume->SetInteractor( interactor ); 00064 //_boxWidgetVolume->SetPlaceFactor(1); 00065 //_boxWidgetVolume->SetInput( img ); 00066 //_boxWidgetVolume->PlaceWidget(); 00067 00068 _boxWidgetVolume->AddObserver( vtkCommand::InteractionEvent , observer ); 00069 _boxWidgetVolume->AddObserver( vtkCommand::StartInteractionEvent , observer ); 00070 _boxWidgetVolume->AddObserver( vtkCommand::RightButtonReleaseEvent , observer ); 00071 00072 _boxWidgetVolume->HandlesOn (); 00073 _boxWidgetVolume->On(); 00074 //_boxWidgetVolume->GetHandleProperty()->SetOpacity(0.5); 00075 //_boxWidgetVolume->GetOutlineProperty()->SetOpacity(0.5); 00076 }
void CutModelData::createShapes | ( | ) | [private] |
Definition at line 121 of file CutModelData.cxx.
References _cubefigure, _cylinderfigure, and _spherefigure.
Referenced by initializeData().
00121 { 00122 _cubefigure = new CutModelFigureCube(); 00123 _cylinderfigure = new CutModelFigureCylinder(); 00124 _spherefigure = new CutModelFigureSphere(); 00125 }
void CutModelData::ExecuteCut | ( | double * | range, | |
bool | isinside, | |||
vtkImageData * | copyimage | |||
) | throw ( CutModelException) |
Definition at line 201 of file CutModelData.cxx.
References CutModelFigure::IfPointInside(), CutModelFigure::SetInversVtkTransform(), and CutModelFigure::SetVtkTransform().
Referenced by CutModelManager::ExecuteCut(), and CutModelManager::Redo().
00202 { 00203 wxBusyCursor wait; 00204 00205 CutModelFigure* actualCuttingModel = getCurentCuttingModel(); 00206 00207 //_boxWidgetVolume->GetTransform(currentmatrix); 00208 actualCuttingModel->SetVtkTransform(getModelTransform(copyimage)); 00209 //actualCuttingModel->SetVtkTransform(currentmatrix); 00210 actualCuttingModel->SetInversVtkTransform(getModelTransformInvers()); 00211 00212 bool inside; 00213 //bool volInt, volExt; // unused 00214 int xx,yy,zz; 00215 unsigned short* pOrg; 00216 int ext[6]; 00217 //double spc[3]; // unused 00218 //long int contAfter = 0; // unused 00219 //long int contBefor = 0; // unused 00220 00221 double minvalue = range[0]; 00222 double value = range[1]; 00223 double maxvalue = range[2]; 00224 00225 copyimage->GetExtent(ext); 00226 00227 for (xx=ext[0];xx<ext[1]; xx++) 00228 { 00229 for (yy=ext[2];yy<ext[3]; yy++) 00230 { 00231 for (zz=ext[4];zz<ext[5];zz++) 00232 { 00233 inside=actualCuttingModel->IfPointInside(xx,yy,zz); 00234 if ( ((inside==true)&&(isinside==true)) || ((!inside==true)&&(!isinside)) ) 00235 { 00236 pOrg=(unsigned short*)copyimage->GetScalarPointer (xx,yy,zz); 00237 00238 //std::cout<<"xx,yy,zz "<<xx<<","<<yy<<","<<zz<<" "<<*pOrg<<std::endl; 00239 if ((unsigned short)minvalue <=(*pOrg)&&(*pOrg)<=(unsigned short)maxvalue) 00240 { 00241 00242 *pOrg=(unsigned short)value; 00243 00244 } 00245 } // if inside 00246 } // for zz 00247 } // for yy 00248 } // for xx 00249 }
void CutModelData::ExecuteUnCut | ( | bool | isinside, | |
vtkImageData * | image, | |||
vtkImageData * | copyimage | |||
) | throw ( CutModelException) |
Definition at line 251 of file CutModelData.cxx.
References CutModelFigure::IfPointInside(), CutModelFigure::SetInversVtkTransform(), and CutModelFigure::SetVtkTransform().
Referenced by CutModelManager::Undo().
00252 { 00253 wxBusyCursor wait; 00254 00255 CutModelFigure* actualCuttingModel = getCurentCuttingModel(); 00256 00257 actualCuttingModel->SetVtkTransform(getModelTransform(copyimage)); 00258 00259 actualCuttingModel->SetInversVtkTransform(getModelTransformInvers()); 00260 00261 bool inside; 00262 // bool volInt, volExt; // unused // JPRx 00263 int xx,yy,zz; 00264 unsigned short* pOrg; 00265 int ext[6]; 00266 //double spc[3]; // unused // JPRx 00267 //long int contAfter = 0; // unused // JPRx 00268 //long int contBefor = 0; // unused // JPRx 00269 00270 double value; 00271 00272 copyimage->GetExtent(ext); 00273 00274 for (xx=ext[0];xx<ext[1]; xx++) 00275 { 00276 for (yy=ext[2];yy<ext[3]; yy++) 00277 { 00278 for (zz=ext[4];zz<ext[5];zz++) 00279 { 00280 inside=actualCuttingModel->IfPointInside(xx,yy,zz); 00281 if ( ((inside==true)&&(isinside==true)) || ((!inside==true)&&(!isinside)) ) 00282 { 00283 value = *((unsigned short*)image->GetScalarPointer (xx,yy,zz)); 00284 pOrg=(unsigned short*)copyimage->GetScalarPointer (xx,yy,zz); 00285 //std::cout<<"CutModelData::ExecuteUnCut() "<<value<<" "<<*pOrg<<std::endl; 00286 *pOrg=(unsigned short)value; 00287 } // if inside 00288 } // for zz 00289 } // for yy 00290 } // for xx 00291 }
vtkActor * CutModelData::getActor | ( | ) | throw ( CutModelException) |
Definition at line 177 of file CutModelData.cxx.
References _Actor, and checkInvariant().
Referenced by CutModelManager::onAddCutModel(), CutModelManager::RefreshActor(), and CutModelManager::RemoveActor().
00177 { 00178 checkInvariant(); 00179 return _Actor; 00180 }
CutModelFigure * CutModelData::getCurentCuttingModel | ( | ) | [private] |
Definition at line 187 of file CutModelData.cxx.
References _cubefigure, _currentshape, _cylinderfigure, _spherefigure, and checkInvariant().
00187 { 00188 checkInvariant(); 00189 00190 if(_currentshape == 0){ 00191 return _spherefigure; 00192 }else if(_currentshape == 1){ 00193 return _cylinderfigure; 00194 }else if(_currentshape == 2){ 00195 return _cubefigure; 00196 }else{ 00197 throw CutModelException("Shape type not found"); 00198 } 00199 }
vtkTransform* CutModelData::getCurrentMatrix | ( | ) | [inline] |
Definition at line 75 of file CutModelData.h.
References currentmatrix.
00075 { 00076 return currentmatrix; 00077 }
int CutModelData::getCurrentShape | ( | ) | [inline] |
Definition at line 79 of file CutModelData.h.
References _currentshape.
00079 { 00080 return _currentshape; 00081 }
int CutModelData::getId | ( | ) | [inline] |
Definition at line 51 of file CutModelData.h.
References _id.
Referenced by CutModelManager::getCutModelData().
00051 { 00052 return _id; 00053 }
vtkTransform * CutModelData::getModelTransform | ( | vtkImageData * | copyimage | ) | [private] |
Definition at line 293 of file CutModelData.cxx.
References currentmatrix, and modeltransform.
00293 { 00294 00295 double *spc = copyimage->GetSpacing(); 00296 modeltransform->Identity(); 00297 00298 vtkMatrix4x4* matrix = currentmatrix->GetMatrix(); 00299 vtkMatrix4x4* matrixmodel = modeltransform->GetMatrix(); 00300 matrixmodel->SetElement(0,0,matrix->GetElement(0,0)/spc[0]); 00301 matrixmodel->SetElement(1,0,matrix->GetElement(1,0)/spc[0]); 00302 matrixmodel->SetElement(2,0,matrix->GetElement(2,0)/spc[0]); 00303 matrixmodel->SetElement(0,1,matrix->GetElement(0,1)/spc[1]); 00304 matrixmodel->SetElement(1,1,matrix->GetElement(1,1)/spc[1]); 00305 matrixmodel->SetElement(2,1,matrix->GetElement(2,1)/spc[1]); 00306 matrixmodel->SetElement(0,2,matrix->GetElement(0,2)/spc[2]); 00307 matrixmodel->SetElement(1,2,matrix->GetElement(1,2)/spc[2]); 00308 matrixmodel->SetElement(2,2,matrix->GetElement(2,2)/spc[2]); 00309 matrixmodel->SetElement(0,3,matrix->GetElement(0,3)/spc[0]); 00310 matrixmodel->SetElement(1,3,matrix->GetElement(1,3)/spc[1]); 00311 matrixmodel->SetElement(2,3,matrix->GetElement(2,3)/spc[2]); 00312 00313 /* 00314 double* pos = currentmatrix->GetPosition(); 00315 modeltransform->Translate(pos[0]/spc[0],pos[1]/spc[1],pos[2]/spc[2]); 00316 00317 double* scal = currentmatrix->GetScale(); 00318 modeltransform->Scale(scal[0]/spc[0],scal[1]/spc[1],scal[2]/spc[2]); 00319 00320 //double* orient = currentmatrix->GetOrientation(); 00321 //modeltransform->RotateZ(orient[2]); 00322 //modeltransform->RotateY(orient[1]); 00323 //modeltransform->RotateX(orient[0]); 00324 double* orient = currentmatrix->GetOrientationWXYZ(); 00325 modeltransform->RotateWXYZ(orient[0],orient[1],orient[2],orient[3]); 00326 */ 00327 00328 modeltransform->Update(); 00329 00330 return modeltransform; 00331 }
vtkTransform * CutModelData::getModelTransformInvers | ( | ) | [private] |
Definition at line 371 of file CutModelData.cxx.
References inversModel, and modeltransform.
00371 { 00372 inversModel->Identity (); 00373 inversModel->Concatenate ( modeltransform ); 00374 inversModel->Inverse(); 00375 return inversModel; 00376 }
vtkPolyData * CutModelData::getPolyData | ( | ) | throw ( CutModelException) |
Definition at line 378 of file CutModelData.cxx.
References _Mapper.
00378 { 00379 return _Mapper->GetInput(); 00380 }
void CutModelData::initializeData | ( | int | id, | |
vtkRenderWindowInteractor * | interactor, | |||
vtkCommand * | observer, | |||
vtkImageData * | img | |||
) |
Definition at line 30 of file CutModelData.cxx.
References _currentshape, _id, ChangeShape(), checkInvariant(), createActor(), createBoxWidget(), createShapes(), and setTransform().
Referenced by CutModelData().
00030 { 00031 _id = id; 00032 _currentshape=0; 00033 createBoxWidget(interactor, observer); 00034 setTransform(img); 00035 createActor(); 00036 createShapes(); 00037 ChangeShape(0); 00038 checkInvariant(); 00039 }
void CutModelData::RefreshViewBox | ( | ) |
Definition at line 58 of file CutModelData.cxx.
Referenced by CutModelManager::RefreshActor().
void CutModelData::setCurrentShape | ( | int | currentshape | ) | [inline] |
Definition at line 83 of file CutModelData.h.
References _currentshape.
Referenced by CutModelManager::Redo(), and CutModelManager::Undo().
00083 { 00084 _currentshape = currentshape; 00085 }
void CutModelData::setTransform | ( | vtkImageData * | img | ) | throw ( CutModelException) [private] |
Definition at line 78 of file CutModelData.cxx.
00078 { 00079 00080 currentmatrix = vtkTransform::New(); 00081 modeltransform = vtkTransform::New(); 00082 inversModel = vtkTransform::New(); 00083 00084 vtkMatrix4x4* matrix = vtkMatrix4x4::New(); 00085 matrix->Identity(); 00086 int *ext = img->GetExtent(); 00087 double *spc = img->GetSpacing(); 00088 00089 matrix->SetElement(0,0,(ext[1]-ext[0])/4*spc[0]); 00090 matrix->SetElement(1,1,(ext[3]-ext[2])/4*spc[1]); 00091 matrix->SetElement(2,2,(ext[5]-ext[4])/4*spc[2]); 00092 00093 double orgx = (ext[1]-ext[0])/2*spc[0]; 00094 double orgy = (ext[3]-ext[2])/2*spc[1]; 00095 double orgz = (ext[5]-ext[4])/2*spc[2]; 00096 00097 matrix->SetElement(0,3,orgx); 00098 matrix->SetElement(1,3,orgy); 00099 matrix->SetElement(2,3,orgz); 00100 00101 currentmatrix->SetMatrix(matrix); 00102 _boxWidgetVolume->SetTransform(currentmatrix); 00103 }
void CutModelData::setTransform | ( | vtkTransform * | transform, | |
vtkImageData * | img | |||
) | throw ( CutModelException) |
Definition at line 333 of file CutModelData.cxx.
Referenced by initializeData(), CutModelManager::Redo(), and CutModelManager::Undo().
00333 { 00334 00335 // double *spc = img->GetSpacing(); // spc unused // JPR 00336 00337 currentmatrix->Identity(); 00338 00339 /*double* orient = transform->GetOrientationWXYZ(); 00340 currentmatrix->RotateWXYZ(orient[0],orient[1],orient[2],orient[3]); 00341 00342 double* pos = transform->GetPosition(); 00343 currentmatrix->Translate(pos[0]/spc[0],pos[1]/spc[1],pos[2]/spc[2]); 00344 00345 double* scal = transform->GetScale(); 00346 currentmatrix->Scale(scal[0]/spc[0],scal[1]/spc[1],scal[2]/spc[2]); 00347 00348 currentmatrix->Update(); */ 00349 00350 _boxWidgetVolume->SetTransform(transform); 00351 00352 /*vtkMatrix4x4* matrix = transform->GetMatrix(); 00353 vtkMatrix4x4* matrixcurrent = currentmatrix->GetMatrix(); 00354 matrixcurrent->SetElement(0,0,matrix->GetElement(0,0)/spc[0]); 00355 matrixcurrent->SetElement(1,0,matrix->GetElement(1,0)/spc[0]); 00356 matrixcurrent->SetElement(2,0,matrix->GetElement(2,0)/spc[0]); 00357 matrixcurrent->SetElement(0,1,matrix->GetElement(0,1)/spc[1]); 00358 matrixcurrent->SetElement(1,1,matrix->GetElement(1,1)/spc[1]); 00359 matrixcurrent->SetElement(2,1,matrix->GetElement(2,1)/spc[1]); 00360 matrixcurrent->SetElement(0,2,matrix->GetElement(0,2)/spc[2]); 00361 matrixcurrent->SetElement(1,2,matrix->GetElement(1,2)/spc[2]); 00362 matrixcurrent->SetElement(2,2,matrix->GetElement(2,2)/spc[2]); 00363 matrixcurrent->SetElement(0,3,matrix->GetElement(0,3)/spc[0]); 00364 matrixcurrent->SetElement(1,3,matrix->GetElement(1,3)/spc[1]); 00365 matrixcurrent->SetElement(2,3,matrix->GetElement(2,3)/spc[2]); */ 00366 00367 udapteActorDirection(); 00368 getModelTransform(img); 00369 }
void CutModelData::ShowViewBox | ( | bool | check | ) | throw ( CutModelException) |
Definition at line 132 of file CutModelData.cxx.
Referenced by CutModelManager::ShowViewBox().
00132 { 00133 checkInvariant(); 00134 if(check){ 00135 _boxWidgetVolume->On(); 00136 }else{ 00137 _boxWidgetVolume->Off(); 00138 } 00139 }
void CutModelData::udapteActorDirection | ( | ) | throw ( CutModelException) |
Definition at line 114 of file CutModelData.cxx.
References _Actor, _boxWidgetVolume, checkInvariant(), and currentmatrix.
Referenced by CutModelManager::updateActorDirection().
00114 { 00115 checkInvariant(); 00116 00117 _boxWidgetVolume->GetTransform(currentmatrix); 00118 _Actor->SetUserMatrix(currentmatrix->GetMatrix());//SetUserTransform(currentmatrix ); 00119 }
vtkActor* CutModelData::_Actor [private] |
Definition at line 99 of file CutModelData.h.
Referenced by checkInvariant(), createActor(), getActor(), udapteActorDirection(), and ~CutModelData().
vtkBoxWidget* CutModelData::_boxWidgetVolume [private] |
Definition at line 97 of file CutModelData.h.
Referenced by checkInvariant(), createBoxWidget(), udapteActorDirection(), and ~CutModelData().
CutModelFigureCube* CutModelData::_cubefigure [private] |
Definition at line 104 of file CutModelData.h.
Referenced by checkInvariant(), createShapes(), getCurentCuttingModel(), and ~CutModelData().
int CutModelData::_currentshape [private] |
Definition at line 102 of file CutModelData.h.
Referenced by getCurentCuttingModel(), getCurrentShape(), initializeData(), and setCurrentShape().
Definition at line 105 of file CutModelData.h.
Referenced by checkInvariant(), createShapes(), getCurentCuttingModel(), and ~CutModelData().
int CutModelData::_id [private] |
Definition at line 100 of file CutModelData.h.
Referenced by getId(), initializeData(), and ~CutModelData().
vtkPolyDataMapper* CutModelData::_Mapper [private] |
Definition at line 98 of file CutModelData.h.
Referenced by checkInvariant(), createActor(), getPolyData(), and ~CutModelData().
CutModelFigureSphere* CutModelData::_spherefigure [private] |
Definition at line 106 of file CutModelData.h.
Referenced by checkInvariant(), createShapes(), getCurentCuttingModel(), and ~CutModelData().
vtkTransform* CutModelData::currentmatrix [private] |
Definition at line 107 of file CutModelData.h.
Referenced by getCurrentMatrix(), getModelTransform(), udapteActorDirection(), and ~CutModelData().
vtkTransform* CutModelData::inversModel [private] |
Definition at line 109 of file CutModelData.h.
Referenced by getModelTransformInvers(), and ~CutModelData().
vtkTransform* CutModelData::modeltransform [private] |
Definition at line 108 of file CutModelData.h.
Referenced by getModelTransform(), getModelTransformInvers(), and ~CutModelData().