VTK
vtkImageSlab.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkImageSlab.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 =========================================================================*/
30 #ifndef __vtkImageSlab_h
31 #define __vtkImageSlab_h
32 
34 
35 #define VTK_IMAGE_SLAB_MIN 0
36 #define VTK_IMAGE_SLAB_MAX 1
37 #define VTK_IMAGE_SLAB_MEAN 2
38 #define VTK_IMAGE_SLAB_SUM 3
39 
41 {
42 public:
43  static vtkImageSlab *New();
45  void PrintSelf(ostream& os, vtkIndent indent);
46 
48 
50  vtkSetClampMacro(Orientation, int, 0, 2);
52  this->SetOrientation(0); };
54  this->SetOrientation(1); };
56  this->SetOrientation(2); };
57  vtkGetMacro(Orientation, int);
59 
61 
63  vtkSetVector2Macro(SliceRange, int);
64  vtkGetVector2Macro(SliceRange, int);
66 
68 
70  vtkSetClampMacro(Operation, int, 0, 3);
72  this->SetOperation(VTK_IMAGE_SLAB_MIN); };
74  this->SetOperation(VTK_IMAGE_SLAB_MAX); };
76  this->SetOperation(VTK_IMAGE_SLAB_MEAN); };
78  this->SetOperation(VTK_IMAGE_SLAB_SUM); };
79  vtkGetMacro(Operation, int);
80  const char *GetOperationAsString();
82 
84 
88  vtkSetMacro(TrapezoidIntegration, int);
89  vtkBooleanMacro(TrapezoidIntegration, int);
90  vtkGetMacro(TrapezoidIntegration, int);
92 
94 
99  vtkSetMacro(MultiSliceOutput, int);
100  vtkBooleanMacro(MultiSliceOutput, int);
101  vtkGetMacro(MultiSliceOutput, int);
103 
105 
110  this->SetOutputScalarType(VTK_FLOAT); };
112  this->SetOutputScalarType(VTK_DOUBLE); };
114  this->SetOutputScalarType(0); };
115  vtkGetMacro(OutputScalarType, int);
117 
118 protected:
119  vtkImageSlab();
120  ~vtkImageSlab();
121 
126  virtual void ThreadedRequestData(vtkInformation *request,
127  vtkInformationVector **inputVector,
128  vtkInformationVector *outputVector,
129  vtkImageData ***inData,
130  vtkImageData **outData, int ext[6], int id);
131 
132  vtkSetMacro(OutputScalarType, int);
133 
134  int Operation;
136  int SliceRange[2];
140 
141 private:
142  vtkImageSlab(const vtkImageSlab&); // Not implemented.
143  void operator=(const vtkImageSlab&); // Not implemented.
144 };
145 
146 #endif