Commit 7248d114 authored by Ken Martin's avatar Ken Martin
Browse files

added some compatability

parent ff0dc020
......@@ -74,6 +74,7 @@ static const char *vtkCommandEventStrings[] = {
"ResetCameraEvent",
"ResetCameraClippingRangeEvent",
"ModifiedEvent",
"WindowEvent",
NULL
};
......
......@@ -100,6 +100,7 @@ public:
ResetCameraEvent,
ResetCameraClippingRangeEvent,
ModifiedEvent,
WindowLevelEvent,
UserEvent = 1000
};
//ETX
......
......@@ -233,3 +233,31 @@ void vtkImageActor::PrintSelf(ostream& os, vtkIndent indent)
}
os << ")\n";
}
//----------------------------------------------------------------------------
int vtkImageActor::GetWholeZMin()
{
int *extent;
if ( ! this->GetInput())
{
return 0;
}
this->GetInput()->UpdateInformation();
extent = this->GetInput()->GetWholeExtent();
return extent[4];
}
//----------------------------------------------------------------------------
int vtkImageActor::GetWholeZMax()
{
int *extent;
if ( ! this->GetInput())
{
return 0;
}
this->GetInput()->UpdateInformation();
extent = this->GetInput()->GetWholeExtent();
return extent[5];
}
......@@ -117,6 +117,23 @@ public:
virtual void Load(vtkRenderer *) {};
//ETX
// Description:
// Set/Get the current slice number. The axis Z in ZSlice does not
// necessarily have any relation to the z axis of the data on disk.
// It is simply the axis orthogonal to the x,y, display plane.
// GetWholeZMax and Min are convenience methods for obtaining
// the number of slices that can be displayed. Again the number
// of slices is in reference to the display z axis, which is not
// necessarily the z axis on disk. (due to reformatting etc)
void SetZSlice(int z) {this->SetDisplayExtent(
this->DisplayExtent[0], this->DisplayExtent[1],
this->DisplayExtent[2], this->DisplayExtent[3], z, z);
};
int GetZSlice() { return this->DisplayExtent[4];};
int GetWholeZMin();
int GetWholeZMax();
protected:
vtkImageActor();
~vtkImageActor();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment