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 =========================================================================*/
25 #ifndef vtkImageSliceCollection_h
26 #define vtkImageSliceCollection_h
27 
28 #include "vtkRenderingImageModule.h" // For export macro
29 #include "vtkPropCollection.h"
30 #include "vtkImageSlice.h" // to allow inline static-cast
31 
33 {
34  public:
35  static vtkImageSliceCollection *New();
37 
42  void Sort();
43 
46  void AddItem(vtkImageSlice *a);
47 
51  vtkImageSlice *GetNextImage();
52 
53  //BTX
55 
56  vtkImageSlice *GetNextImage(vtkCollectionSimpleIterator &cookie);
57  //ETX
59 
62  vtkImageSlice *GetNextItem() { return this->GetNextImage(); }
63 
64 protected:
67 
68  virtual void DeleteElement(vtkCollectionElement *);
69 
70 private:
71  // hide the standard AddItem from the user and the compiler.
72  void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
73  void AddItem(vtkProp *o) { this->vtkPropCollection::AddItem(o); };
74 
75 private:
76  vtkImageSliceCollection(const vtkImageSliceCollection&); // Not implemented.
77  void operator=(const vtkImageSliceCollection&); // Not implemented.
78 };
79 
81 {
82  return static_cast<vtkImageSlice *>(this->GetNextItemAsObject());
83 }
84 
87 {
88  return static_cast<vtkImageSlice *>(this->GetNextItemAsObject(cookie));
89 }
90 
91 
92 #endif
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:52
void * vtkCollectionSimpleIterator
Definition: vtkCollection.h:47
abstract base class for most VTK objects
Definition: vtkObject.h:61
virtual void DeleteElement(vtkCollectionElement *)
a sorted list of image slice objects
a list of Props
#define VTKRENDERINGIMAGE_EXPORT
void AddItem(vtkObject *)
void AddItem(vtkProp *a)
represents an image in a 3D scene
Definition: vtkImageSlice.h:51
vtkObject * GetNextItemAsObject()
static vtkPropCollection * New()