void ImagePlanes::bbUserSetDefaultValues()
{
- bbSetOutputPlaneX(0);
- bbSetOutputPlaneY(0);
- bbSetOutputPlaneZ(0);
- bbSetOutputImageX(0);
- bbSetOutputImageY(0);
- bbSetOutputImageZ(0);
- bbSetInputIn(0);
+ bbSetOutputPlaneX(NULL);
+ bbSetOutputPlaneY(NULL);
+ bbSetOutputPlaneZ(NULL);
+ bbSetOutputImageX(NULL);
+ bbSetOutputImageY(NULL);
+ bbSetOutputImageZ(NULL);
+ bbSetInputIn(NULL);
std::vector<double> vect;
vect.push_back(0);
vect.push_back(0);
//bbSetOutputImage3Pts(planeWidget3Pts->GetResliceOutput());
if(picker != 0)
+ {
picker->UnRegister(NULL);
-
+ }
+
mVtkCallback = VtkCallbackType::New();
mVtkCallback->SetBlackBox(this);
planeWidgetX->AddObserver(vtkCommand::InteractionEvent,mVtkCallback);
//Get the corresponding three points out of the vectors
double origin[3];
- origin[0] = pointsx[0];
- origin[1] = pointsy[0];
- origin[2] = pointsz[0];
+ origin[0] = pointsx[0];
+ origin[1] = pointsy[0];
+ origin[2] = pointsz[0];
double point1[3];
- point1[0] = pointsx[1];
- point1[1] = pointsy[1];
- point1[2] = pointsz[1];
+ point1[0] = pointsx[1];
+ point1[1] = pointsy[1];
+ point1[2] = pointsz[1];
double point2[3];
- point2[0]= pointsx[2];
- point2[1]= pointsy[2];
- point2[2]= pointsz[2];
+ point2[0] = pointsx[2];
+ point2[1] = pointsy[2];
+ point2[2] = pointsz[2];
//With the three points we create the corresponding X, Y and Z vectors all orthogonal to each other
- double* vect1= getNormal(makeVector(origin, point1));
- double* vect2= getNormal(makeVector(origin, point2));
- double* crossp = getCrossProduct(vect1, vect2);
+ double* vect1 = getNormal(makeVector(origin, point1));
+ double* vect2 = getNormal(makeVector(origin, point2));
+ double* crossp = getCrossProduct(vect1, vect2);
- double *newx = getCrossProduct(vect2, crossp);
+ double *newx = getCrossProduct(vect2, crossp);
- int ext[6],factor=0;
+ int ext[6],factor = 0;
bbGetInputIn()->GetExtent(ext);
factor = ext[0]<ext[3]? ext[3] : ext[0];
#endif
//To get the slice of image out of the selected volume
- if (_imageReslicer==NULL){
+ if (_imageReslicer==NULL)
+ {
_imageReslicer = vtkImageReslice::New();
_imageReslicer->SetOutputDimensionality(2);
_transform = vtkTransform::New();
_matrix = vtkMatrix4x4::New();
- }
+ } // if
_imageReslicer->SetInterpolationMode( bbGetInputInterpolation() );
//EED 2017-01-01 Migration VTK7
_imageReslicer->GetOutput()->UpdateInformation();
#endif
#if (VTK_MAJOR_VERSION >= 6)
- // ..
+ _imageReslicer->Update();
#endif
} // bbGetInputIn
}
- void ImagePlanes::updateInteractor(){
-
- vtkRenderWindowInteractor* interactor = bbGetInputInteractor();
-
- if(interactor){
- bbGetOutputPlaneX()->SetInteractor(interactor);
- bbGetOutputPlaneX()->EnabledOn();
- bbGetOutputPlaneY()->SetInteractor(interactor);
- bbGetOutputPlaneY()->EnabledOn();
- bbGetOutputPlaneZ()->SetInteractor(interactor);
- bbGetOutputPlaneZ()->EnabledOn();
- bbGetOutputPlane3Pts()->SetInteractor(interactor);
- bbGetOutputPlane3Pts()->EnabledOn();
- }
- }
+ void ImagePlanes::updateInteractor()
+ {
+ vtkRenderWindowInteractor* interactor = bbGetInputInteractor();
+ if(interactor)
+ {
+ bbGetOutputPlaneX()->SetInteractor(interactor);
+ bbGetOutputPlaneX()->EnabledOn();
+ bbGetOutputPlaneY()->SetInteractor(interactor);
+ bbGetOutputPlaneY()->EnabledOn();
+ bbGetOutputPlaneZ()->SetInteractor(interactor);
+ bbGetOutputPlaneZ()->EnabledOn();
+ bbGetOutputPlane3Pts()->SetInteractor(interactor);
+ bbGetOutputPlane3Pts()->EnabledOn();
+ } // if
+ }
+
//-----------------------------------------------------------------
- void vtkImageDataPointerRelay::bbUserSetDefaultValues()
+ void vtkImageDataPointerRelay::bbUserSetDefaultValues()
{
}