Program: wxMaracas
Module: $RCSfile: CutModelData.cxx,v $
Language: C++
- Date: $Date: 2009/08/31 08:46:11 $
- Version: $Revision: 1.1 $
+ Date: $Date: 2009/09/01 14:01:36 $
+ Version: $Revision: 1.2 $
Copyright: (c) 2002, 2003
License:
currentmatrix->Delete();
inversModel->Delete();
}
-
+void CutModelData::RefreshViewBox(){
+
+}
void CutModelData::createBoxWidget(vtkRenderWindowInteractor* interactor, vtkCommand* observer){
_boxWidgetVolume = vtkBoxWidget::New();
_boxWidgetVolume->HandlesOn ();
_boxWidgetVolume->On();
+ //_boxWidgetVolume->GetHandleProperty()->SetOpacity(0.5);
+ //_boxWidgetVolume->GetOutlineProperty()->SetOpacity(0.5);
}
void CutModelData::setTransform(vtkImageData* img)throw( CutModelException){
_Actor = vtkActor::New();
_Actor->SetMapper(_Mapper);
_Actor->GetProperty()->SetColor(1, 0, 0);
- _Actor->GetProperty()->SetOpacity(0.4);
+ _Actor->GetProperty()->SetOpacity(0.5);
}
void CutModelData::udapteActorDirection()throw( CutModelException){
double *spc = copyimage->GetSpacing();
- matrixmodel->Identity();
+ modeltransform->Identity();
+
+ double* orient = currentmatrix->GetOrientationWXYZ();
+ modeltransform->RotateWXYZ(orient[0],orient[1],orient[2],orient[3]);
+
+ double* pos = currentmatrix->GetPosition();
+ modeltransform->Translate(pos[0]/spc[0],pos[1]/spc[1],pos[2]/spc[2]);
+
+ double* scal = currentmatrix->GetScale();
+ modeltransform->Scale(scal[0]/spc[0],scal[1]/spc[1],scal[2]/spc[2]);
+
+ /*matrixmodel->Identity();
matrixmodel->SetElement(0,0,matrix->GetElement(0,0)/spc[0]);
matrixmodel->SetElement(1,0,matrix->GetElement(1,0)/spc[0]);
matrixmodel->SetElement(2,0,matrix->GetElement(2,0)/spc[0]);
matrixmodel->SetElement(2,2,matrix->GetElement(2,2)/spc[2]);
matrixmodel->SetElement(0,3,matrix->GetElement(0,3)/spc[0]);
matrixmodel->SetElement(1,3,matrix->GetElement(1,3)/spc[1]);
- matrixmodel->SetElement(2,3,matrix->GetElement(2,3)/spc[2]);
+ matrixmodel->SetElement(2,3,matrix->GetElement(2,3)/spc[2]);*/
+
+ //modeltransform->SetMatrix(matrixmodel);
modeltransform->Update();