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 =========================================================================*/
28 #ifndef vtkImageSlab_h
29 #define vtkImageSlab_h
30 
31 #include "vtkImagingGeneralModule.h" // For export macro
33 
34 class VTKIMAGINGGENERAL_EXPORT vtkImageSlab : public vtkThreadedImageAlgorithm
35 {
36 public:
37  static vtkImageSlab *New();
39  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
40 
42 
46  vtkSetClampMacro(Orientation, int, 0, 2);
48  this->SetOrientation(0); };
50  this->SetOrientation(1); };
52  this->SetOrientation(2); };
53  vtkGetMacro(Orientation, int);
55 
57 
61  vtkSetVector2Macro(SliceRange, int);
62  vtkGetVector2Macro(SliceRange, int);
64 
66 
70  vtkSetClampMacro(Operation, int, VTK_IMAGE_SLAB_MIN, VTK_IMAGE_SLAB_SUM);
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 
90  vtkSetMacro(TrapezoidIntegration, int);
91  vtkBooleanMacro(TrapezoidIntegration, int);
92  vtkGetMacro(TrapezoidIntegration, int);
94 
96 
103  vtkSetMacro(MultiSliceOutput, int);
104  vtkBooleanMacro(MultiSliceOutput, int);
105  vtkGetMacro(MultiSliceOutput, int);
107 
109 
116  this->SetOutputScalarType(VTK_FLOAT); };
118  this->SetOutputScalarType(VTK_DOUBLE); };
120  this->SetOutputScalarType(0); };
121  vtkGetMacro(OutputScalarType, int);
123 
124 protected:
125  vtkImageSlab();
126  ~vtkImageSlab() VTK_OVERRIDE;
127 
128  int RequestInformation(vtkInformation *, vtkInformationVector **,
129  vtkInformationVector *) VTK_OVERRIDE;
130  int RequestUpdateExtent(vtkInformation *, vtkInformationVector **,
131  vtkInformationVector *) VTK_OVERRIDE;
132  void ThreadedRequestData(vtkInformation *request,
133  vtkInformationVector **inputVector,
134  vtkInformationVector *outputVector,
135  vtkImageData ***inData,
136  vtkImageData **outData, int ext[6], int id) VTK_OVERRIDE;
137 
138  vtkSetMacro(OutputScalarType, int);
139 
140  int Operation;
141  int Orientation;
142  int SliceRange[2];
143  int OutputScalarType;
144  int MultiSliceOutput;
145  int TrapezoidIntegration;
146 
147 private:
148  vtkImageSlab(const vtkImageSlab&) VTK_DELETE_FUNCTION;
149  void operator=(const vtkImageSlab&) VTK_DELETE_FUNCTION;
150 };
151 
152 #endif
void SetOperationToMin()
Set the operation to use when combining slices.
Definition: vtkImageSlab.h:71
#define VTK_IMAGE_SLAB_MAX
void SetOperationToMean()
Set the operation to use when combining slices.
Definition: vtkImageSlab.h:75
#define VTK_IMAGE_SLAB_MIN
Store vtkAlgorithm input/output information.
void SetOperationToMax()
Set the operation to use when combining slices.
Definition: vtkImageSlab.h:73
void SetOrientationToZ()
Set the slice direction: zero for x, 1 for y, 2 for z.
Definition: vtkImageSlab.h:51
#define VTK_IMAGE_SLAB_SUM
#define VTK_IMAGE_SLAB_MEAN
void SetOrientationToY()
Set the slice direction: zero for x, 1 for y, 2 for z.
Definition: vtkImageSlab.h:49
void SetOperationToSum()
Set the operation to use when combining slices.
Definition: vtkImageSlab.h:77
void SetOrientationToX()
Set the slice direction: zero for x, 1 for y, 2 for z.
Definition: vtkImageSlab.h:47
void SetOutputScalarTypeToFloat()
Set the output scalar type to float or double, to avoid potential overflow when doing a summation ope...
Definition: vtkImageSlab.h:115
#define VTK_DOUBLE
Definition: vtkType.h:59
Generic filter that has one input.
combine image slices to form a slab image
Definition: vtkImageSlab.h:34
#define VTK_FLOAT
Definition: vtkType.h:58
void SetOutputScalarTypeToDouble()
Set the output scalar type to float or double, to avoid potential overflow when doing a summation ope...
Definition: vtkImageSlab.h:117
a simple class to control print indentation
Definition: vtkIndent.h:33
topologically and geometrically regular array of data
Definition: vtkImageData.h:39
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
void SetOutputScalarTypeToInputScalarType()
Set the output scalar type to float or double, to avoid potential overflow when doing a summation ope...
Definition: vtkImageSlab.h:119
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.