VTK  9.4.20250104
vtkImageSliceCollection.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
14#ifndef vtkImageSliceCollection_h
15#define vtkImageSliceCollection_h
16
17#include "vtkImageSlice.h" // to allow inline static-cast
18#include "vtkPropCollection.h"
19#include "vtkRenderingImageModule.h" // For export macro
20
21VTK_ABI_NAMESPACE_BEGIN
22class VTKRENDERINGIMAGE_EXPORT vtkImageSliceCollection : public vtkPropCollection
23{
24public:
27 void PrintSelf(ostream& os, vtkIndent indent) override;
28
35 void Sort();
36
42
48 vtkImageSlice* GetNextImage();
49
53 vtkImageSlice* GetNextImage(vtkCollectionSimpleIterator& cookie);
54
60 vtkImageSlice* GetNextItem() { return this->GetNextImage(); }
61
62protected:
65
67
68private:
69 // hide the standard AddItem from the user and the compiler.
70 void AddItem(vtkObject* o) { this->vtkCollection::AddItem(o); }
71 void AddItem(vtkProp* o) { this->vtkPropCollection::AddItem(o); }
72
74 void operator=(const vtkImageSliceCollection&) = delete;
75};
76
78{
79 return static_cast<vtkImageSlice*>(this->GetNextItemAsObject());
80}
81
83{
84 return static_cast<vtkImageSlice*>(this->GetNextItemAsObject(cookie));
85}
86
87VTK_ABI_NAMESPACE_END
88#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:108
abstract base class for most VTK objects
Definition vtkObject.h:162
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:66
void * vtkCollectionSimpleIterator