VTK  9.2.6
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 =========================================================================*/
31 #ifndef vtkImageSlab_h
32 #define vtkImageSlab_h
33 
34 #include "vtkImagingGeneralModule.h" // For export macro
36 
37 class VTKIMAGINGGENERAL_EXPORT vtkImageSlab : public vtkThreadedImageAlgorithm
38 {
39 public:
40  static vtkImageSlab* New();
42  void PrintSelf(ostream& os, vtkIndent indent) override;
43 
45 
49  vtkSetClampMacro(Orientation, int, 0, 2);
50  void SetOrientationToX() { this->SetOrientation(0); }
51  void SetOrientationToY() { this->SetOrientation(1); }
52  void SetOrientationToZ() { 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);
71  void SetOperationToMin() { this->SetOperation(VTK_IMAGE_SLAB_MIN); }
72  void SetOperationToMax() { this->SetOperation(VTK_IMAGE_SLAB_MAX); }
73  void SetOperationToMean() { this->SetOperation(VTK_IMAGE_SLAB_MEAN); }
74  void SetOperationToSum() { this->SetOperation(VTK_IMAGE_SLAB_SUM); }
75  vtkGetMacro(Operation, int);
76  const char* GetOperationAsString();
78 
80 
86  vtkSetMacro(TrapezoidIntegration, vtkTypeBool);
87  vtkBooleanMacro(TrapezoidIntegration, vtkTypeBool);
88  vtkGetMacro(TrapezoidIntegration, vtkTypeBool);
90 
92 
99  vtkSetMacro(MultiSliceOutput, vtkTypeBool);
100  vtkBooleanMacro(MultiSliceOutput, vtkTypeBool);
101  vtkGetMacro(MultiSliceOutput, vtkTypeBool);
103 
105 
111  void SetOutputScalarTypeToFloat() { this->SetOutputScalarType(VTK_FLOAT); }
112  void SetOutputScalarTypeToDouble() { this->SetOutputScalarType(VTK_DOUBLE); }
113  void SetOutputScalarTypeToInputScalarType() { this->SetOutputScalarType(0); }
114  vtkGetMacro(OutputScalarType, int);
116 
117 protected:
119  ~vtkImageSlab() override;
120 
124  vtkInformationVector* outputVector, vtkImageData*** inData, vtkImageData** outData, int ext[6],
125  int id) override;
126 
127  vtkSetMacro(OutputScalarType, int);
128 
131  int SliceRange[2];
135 
136 private:
137  vtkImageSlab(const vtkImageSlab&) = delete;
138  void operator=(const vtkImageSlab&) = delete;
139 };
140 
141 #endif
topologically and geometrically regular array of data
Definition: vtkImageData.h:163
combine image slices to form a slab image
Definition: vtkImageSlab.h:38
void SetOperationToSum()
Set the operation to use when combining slices.
Definition: vtkImageSlab.h:74
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkImageSlab * New()
void ThreadedRequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector, vtkImageData ***inData, vtkImageData **outData, int ext[6], int id) override
If the subclass does not define an Execute method, then the task will be broken up,...
void SetOperationToMean()
Set the operation to use when combining slices.
Definition: vtkImageSlab.h:73
void SetOutputScalarTypeToFloat()
Set the output scalar type to float or double, to avoid potential overflow when doing a summation ope...
Definition: vtkImageSlab.h:111
void SetOrientationToX()
Set the slice direction: zero for x, 1 for y, 2 for z.
Definition: vtkImageSlab.h:50
const char * GetOperationAsString()
Set the operation to use when combining slices.
void SetOperationToMax()
Set the operation to use when combining slices.
Definition: vtkImageSlab.h:72
vtkTypeBool TrapezoidIntegration
Definition: vtkImageSlab.h:134
void SetOutputScalarTypeToDouble()
Set the output scalar type to float or double, to avoid potential overflow when doing a summation ope...
Definition: vtkImageSlab.h:112
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Subclasses can reimplement this method to collect information from their inputs and set information f...
void SetOrientationToZ()
Set the slice direction: zero for x, 1 for y, 2 for z.
Definition: vtkImageSlab.h:52
int OutputScalarType
Definition: vtkImageSlab.h:132
~vtkImageSlab() override
void SetOrientationToY()
Set the slice direction: zero for x, 1 for y, 2 for z.
Definition: vtkImageSlab.h:51
void SetOutputScalarTypeToInputScalarType()
Set the output scalar type to float or double, to avoid potential overflow when doing a summation ope...
Definition: vtkImageSlab.h:113
void SetOperationToMin()
Set the operation to use when combining slices.
Definition: vtkImageSlab.h:71
int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Subclasses can reimplement this method to translate the update extent requests from each output port ...
vtkTypeBool MultiSliceOutput
Definition: vtkImageSlab.h:133
a simple class to control print indentation
Definition: vtkIndent.h:119
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Generic filter that has one input.
int vtkTypeBool
Definition: vtkABI.h:69
#define VTK_IMAGE_SLAB_MAX
#define VTK_IMAGE_SLAB_MIN
#define VTK_IMAGE_SLAB_SUM
#define VTK_IMAGE_SLAB_MEAN
#define VTK_DOUBLE
Definition: vtkType.h:55
#define VTK_FLOAT
Definition: vtkType.h:54