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 "vtkPropCollection.h"
29 #include "vtkImageSlice.h" // to allow inline static-cast
30 
32 {
33  public:
34  static vtkImageSliceCollection *New();
36 
41  void Sort();
42 
45  void AddItem(vtkImageSlice *a);
46 
50  vtkImageSlice *GetNextImage();
51 
52  //BTX
54 
55  vtkImageSlice *GetNextImage(vtkCollectionSimpleIterator &cookie);
56  //ETX
58 
61  vtkImageSlice *GetNextItem() { return this->GetNextImage(); }
62 
63 protected:
66 
67  virtual void DeleteElement(vtkCollectionElement *);
68 
69 private:
70  // hide the standard AddItem from the user and the compiler.
71  void AddItem(vtkObject *o) { this->vtkCollection::AddItem(o); };
72  void AddItem(vtkProp *o) { this->vtkPropCollection::AddItem(o); };
73 
74 private:
75  vtkImageSliceCollection(const vtkImageSliceCollection&); // Not implemented.
76  void operator=(const vtkImageSliceCollection&); // Not implemented.
77 };
78 
80 {
81  return static_cast<vtkImageSlice *>(this->GetNextItemAsObject());
82 }
83 
86 {
87  return static_cast<vtkImageSlice *>(this->GetNextItemAsObject(cookie));
88 }
89 
90 
91 #endif