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 
33 class VTKRENDERINGIMAGE_EXPORT vtkImageSliceCollection : public vtkPropCollection
34 {
35 public:
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 
73 protected:
76 
78 
79 private:
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 
84 private:
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
vtkCollectionSimpleIterator
void * vtkCollectionSimpleIterator
Definition: vtkCollection.h:48
vtkImageSliceCollection::DeleteElement
void DeleteElement(vtkCollectionElement *) override
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:82
vtkImageSliceCollection::Sort
void Sort()
Sorts the vtkImageSliceCollection by layer number.
vtkCollection::GetNextItemAsObject
vtkObject * GetNextItemAsObject()
Get the next item in the collection.
Definition: vtkCollection.h:179
vtkImageSlice
represents an image in a 3D scene
Definition: vtkImageSlice.h:156
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:113
vtkImageSliceCollection::GetNextImage
vtkImageSlice * GetNextImage()
Standard Collection methods.
Definition: vtkImageSliceCollection.h:89
vtkPropCollection::AddItem
void AddItem(vtkProp *a)
Add a Prop to the bottom of the list.
Definition: vtkPropCollection.h:136
vtkImageSliceCollection
a sorted list of image slice objects
Definition: vtkImageSliceCollection.h:34
vtkImageSliceCollection::AddItem
void AddItem(vtkImageSlice *a)
Add an image to the list.
vtkImageSliceCollection::vtkImageSliceCollection
vtkImageSliceCollection()=default
vtkImageSliceCollection::GetNextItem
vtkImageSlice * GetNextItem()
Access routine provided for compatibility with previous versions of VTK.
Definition: vtkImageSliceCollection.h:71
vtkProp
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:76
vtkImageSlice.h
vtkImageSliceCollection::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkCollection::AddItem
void AddItem(vtkObject *)
Add an object to the bottom of the list.
vtkImageSliceCollection::New
static vtkImageSliceCollection * New()
vtkCollectionElement
Definition: vtkCollection.h:38
vtkPropCollection
an ordered list of Props
Definition: vtkPropCollection.h:85
vtkImageSliceCollection::~vtkImageSliceCollection
~vtkImageSliceCollection() override
vtkPropCollection.h