VTK
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 "vtkRenderingImageModule.h" // For export macro
30#include "vtkPropCollection.h"
31#include "vtkImageSlice.h" // to allow inline static-cast
32
33class VTKRENDERINGIMAGE_EXPORT vtkImageSliceCollection : public vtkPropCollection
34{
35 public:
38
45 void Sort();
46
52
58 vtkImageSlice *GetNextImage();
59
63 vtkImageSlice *GetNextImage(vtkCollectionSimpleIterator &cookie);
64
70 vtkImageSlice *GetNextItem() { return this->GetNextImage(); }
71
72protected:
75
77
78private:
79 // hide the standard AddItem from the user and the compiler.
80 void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
81 void AddItem(vtkProp *o) { this->vtkPropCollection::AddItem(o); };
82
83private:
84 vtkImageSliceCollection(const vtkImageSliceCollection&) VTK_DELETE_FUNCTION;
85 void operator=(const vtkImageSliceCollection&) VTK_DELETE_FUNCTION;
86};
87
89{
90 return static_cast<vtkImageSlice *>(this->GetNextItemAsObject());
91}
92
95{
96 return static_cast<vtkImageSlice *>(this->GetNextItemAsObject(cookie));
97}
98
99
100#endif
void AddItem(vtkObject *)
Add an object to the list.
vtkObject * GetNextItemAsObject()
Get the next item in the collection.
a sorted list of image slice objects
void Sort()
Sorts the vtkImageSliceCollection by layer number.
virtual void DeleteElement(vtkCollectionElement *)
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.
represents an image in a 3D scene
Definition: vtkImageSlice.h:53
abstract base class for most VTK objects
Definition: vtkObject.h:60
a list of Props
void AddItem(vtkProp *a)
Add an Prop to the list.
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:48
void * vtkCollectionSimpleIterator
Definition: vtkCollection.h:47