70 #include "vtkSmartPointer.h"
71 #include "vtkBoxWidget.h"
72 #include "vtkPolyData.h"
75 unsigned long,
void *)
83 vtkBoxWidget *widget =
reinterpret_cast< vtkBoxWidget *
>( caller );
91 vtkSmartPointer< vtkPolyData > myBox = vtkSmartPointer< vtkPolyData >::New();
92 widget->GetPolyData(myBox);
94 double bounds[6] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
99 double xmin, xmax, ymin, ymax, zmin, zmax;
100 double *pt = myBox->GetPoint(8);
102 pt = myBox->GetPoint(9);
104 pt = myBox->GetPoint(10);
106 pt = myBox->GetPoint(11);
108 pt = myBox->GetPoint(12);
110 pt = myBox->GetPoint(13);
113 if ( xmin < bounds[0] ) { xmin = bounds[0]; }
114 if ( ymin < bounds[2] ) { ymin = bounds[2]; }
115 if ( zmin < bounds[4] ) { zmin = bounds[4]; }
116 if ( xmax > bounds[1] ) { xmax = bounds[1]; }
117 if ( ymax > bounds[3] ) { ymax = bounds[3]; }
118 if ( zmax > bounds[5] ) { zmax = bounds[5]; }
120 this->
VolumeMapper->SetCroppingRegionFlagsToSubVolume();
vtkVolumeMapper * VolumeMapper
virtual void Execute(vtkObject *caller, unsigned long, void *)