Commit 74c75b4e authored by David Gobbi's avatar David Gobbi
Browse files

ENH: Add HasImage and GetImages methods to vtkImageStack.

parent 4f5f7073
......@@ -73,6 +73,12 @@ void vtkImageStack::RemoveImage(vtkImageSlice *prop)
}
}
//----------------------------------------------------------------------------
int vtkImageStack::HasImage(vtkImageSlice *prop)
{
return this->Images->IsItemPresent(prop);
}
//----------------------------------------------------------------------------
void vtkImageStack::GetImages(vtkPropCollection *vc)
{
......
......@@ -44,13 +44,23 @@ public:
static vtkImageStack *New();
// Description:
// Add an image to the stack.
// Add an image to the stack. If the image is already present, then
// this method will do nothing.
void AddImage(vtkImageSlice *prop);
// Description:
// Remove an image from the stack.
// Remove an image from the stack. If the image is not present, then
// this method will do nothing.
void RemoveImage(vtkImageSlice *prop);
// Description:
// Check if an image is present. The returned value is one or zero.
int HasImage(vtkImageSlice *prop);
// Description:
// Get the list of images as a vtkImageSliceCollection.
vtkImageSliceCollection *GetImages() { return this->Images; }
// Description:
// Set the active layer number. This is the layer that will be
// used for picking and interaction.
......
Markdown is supported
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