VTK  9.3.0
vtkImageSlab.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
19 #ifndef vtkImageSlab_h
20 #define vtkImageSlab_h
21 
22 #include "vtkImagingGeneralModule.h" // For export macro
24 
25 VTK_ABI_NAMESPACE_BEGIN
26 class VTKIMAGINGGENERAL_EXPORT vtkImageSlab : public vtkThreadedImageAlgorithm
27 {
28 public:
29  static vtkImageSlab* New();
31  void PrintSelf(ostream& os, vtkIndent indent) override;
32 
34 
38  vtkSetClampMacro(Orientation, int, 0, 2);
39  void SetOrientationToX() { this->SetOrientation(0); }
40  void SetOrientationToY() { this->SetOrientation(1); }
41  void SetOrientationToZ() { this->SetOrientation(2); }
42  vtkGetMacro(Orientation, int);
44 
46 
50  vtkSetVector2Macro(SliceRange, int);
51  vtkGetVector2Macro(SliceRange, int);
53 
55 
59  vtkSetClampMacro(Operation, int, VTK_IMAGE_SLAB_MIN, VTK_IMAGE_SLAB_SUM);
60  void SetOperationToMin() { this->SetOperation(VTK_IMAGE_SLAB_MIN); }
61  void SetOperationToMax() { this->SetOperation(VTK_IMAGE_SLAB_MAX); }
62  void SetOperationToMean() { this->SetOperation(VTK_IMAGE_SLAB_MEAN); }
63  void SetOperationToSum() { this->SetOperation(VTK_IMAGE_SLAB_SUM); }
64  vtkGetMacro(Operation, int);
65  const char* GetOperationAsString();
67 
69 
75  vtkSetMacro(TrapezoidIntegration, vtkTypeBool);
76  vtkBooleanMacro(TrapezoidIntegration, vtkTypeBool);
77  vtkGetMacro(TrapezoidIntegration, vtkTypeBool);
79 
81 
88  vtkSetMacro(MultiSliceOutput, vtkTypeBool);
89  vtkBooleanMacro(MultiSliceOutput, vtkTypeBool);
90  vtkGetMacro(MultiSliceOutput, vtkTypeBool);
92 
94 
100  void SetOutputScalarTypeToFloat() { this->SetOutputScalarType(VTK_FLOAT); }
101  void SetOutputScalarTypeToDouble() { this->SetOutputScalarType(VTK_DOUBLE); }
102  void SetOutputScalarTypeToInputScalarType() { this->SetOutputScalarType(0); }
103  vtkGetMacro(OutputScalarType, int);
105 
106 protected:
108  ~vtkImageSlab() override;
109 
113  vtkInformationVector* outputVector, vtkImageData*** inData, vtkImageData** outData, int ext[6],
114  int id) override;
115 
116  vtkSetMacro(OutputScalarType, int);
117 
120  int SliceRange[2];
124 
125 private:
126  vtkImageSlab(const vtkImageSlab&) = delete;
127  void operator=(const vtkImageSlab&) = delete;
128 };
129 
130 VTK_ABI_NAMESPACE_END
131 #endif
topologically and geometrically regular array of data
Definition: vtkImageData.h:52
combine image slices to form a slab image
Definition: vtkImageSlab.h:27
void SetOperationToSum()
Set the operation to use when combining slices.
Definition: vtkImageSlab.h:63
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:62
void SetOutputScalarTypeToFloat()
Set the output scalar type to float or double, to avoid potential overflow when doing a summation ope...
Definition: vtkImageSlab.h:100
void SetOrientationToX()
Set the slice direction: zero for x, 1 for y, 2 for z.
Definition: vtkImageSlab.h:39
const char * GetOperationAsString()
Set the operation to use when combining slices.
void SetOperationToMax()
Set the operation to use when combining slices.
Definition: vtkImageSlab.h:61
vtkTypeBool TrapezoidIntegration
Definition: vtkImageSlab.h:123
void SetOutputScalarTypeToDouble()
Set the output scalar type to float or double, to avoid potential overflow when doing a summation ope...
Definition: vtkImageSlab.h:101
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:41
int OutputScalarType
Definition: vtkImageSlab.h:121
~vtkImageSlab() override
void SetOrientationToY()
Set the slice direction: zero for x, 1 for y, 2 for z.
Definition: vtkImageSlab.h:40
void SetOutputScalarTypeToInputScalarType()
Set the output scalar type to float or double, to avoid potential overflow when doing a summation ope...
Definition: vtkImageSlab.h:102
void SetOperationToMin()
Set the operation to use when combining slices.
Definition: vtkImageSlab.h:60
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:122
a simple class to control print indentation
Definition: vtkIndent.h:38
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Generic filter that has one input.
int vtkTypeBool
Definition: vtkABI.h:64
#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:43
#define VTK_FLOAT
Definition: vtkType.h:42