VTK  9.1.0
vtkImageSliceCollection.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkImageSliceCollection.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
26#ifndef vtkImageSliceCollection_h
27#define vtkImageSliceCollection_h
28
29#include "vtkImageSlice.h" // to allow inline static-cast
30#include "vtkPropCollection.h"
31#include "vtkRenderingImageModule.h" // For export macro
32
33class VTKRENDERINGIMAGE_EXPORT vtkImageSliceCollection : public vtkPropCollection
34{
35public:
38 void PrintSelf(ostream& os, vtkIndent indent) override;
39
46 void Sort();
47
53
59 vtkImageSlice* GetNextImage();
60
64 vtkImageSlice* GetNextImage(vtkCollectionSimpleIterator& cookie);
65
71 vtkImageSlice* GetNextItem() { return this->GetNextImage(); }
72
73protected:
76
78
79private:
80 // hide the standard AddItem from the user and the compiler.
81 void AddItem(vtkObject* o) { this->vtkCollection::AddItem(o); }
82 void AddItem(vtkProp* o) { this->vtkPropCollection::AddItem(o); }
83
84private:
86 void operator=(const vtkImageSliceCollection&) = delete;
87};
88
90{
91 return static_cast<vtkImageSlice*>(this->GetNextItemAsObject());
92}
93
95{
96 return static_cast<vtkImageSlice*>(this->GetNextItemAsObject(cookie));
97}
98
99#endif
void AddItem(vtkObject *)
Add an object to the bottom of the list.
vtkObject * GetNextItemAsObject()
Get the next item in the collection.
a sorted list of image slice objects
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void Sort()
Sorts the vtkImageSliceCollection by layer number.
void DeleteElement(vtkCollectionElement *) override
vtkImageSlice * GetNextItem()
Access routine provided for compatibility with previous versions of VTK.
void AddItem(vtkImageSlice *a)
Add an image to the list.
static vtkImageSliceCollection * New()
vtkImageSlice * GetNextImage()
Standard Collection methods.
vtkImageSliceCollection()=default
~vtkImageSliceCollection() override
represents an image in a 3D scene
a simple class to control print indentation
Definition: vtkIndent.h:113
abstract base class for most VTK objects
Definition: vtkObject.h:73
an ordered list of Props
void AddItem(vtkProp *a)
Add a Prop to the bottom of the list.
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:67
void * vtkCollectionSimpleIterator
Definition: vtkCollection.h:48