VTK  9.3.20240424
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
25VTK_ABI_NAMESPACE_BEGIN
26class VTKIMAGINGGENERAL_EXPORT vtkImageSlab : public vtkThreadedImageAlgorithm
27{
28public:
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
106protected:
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
125private:
126 vtkImageSlab(const vtkImageSlab&) = delete;
127 void operator=(const vtkImageSlab&) = delete;
128};
129
130VTK_ABI_NAMESPACE_END
131#endif
topologically and geometrically regular array of data
combine image slices to form a slab image
void SetOperationToSum()
Set the operation to use when combining slices.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
const char * GetOperationAsString()
Set the operation to use when combining slices.
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.
void SetOutputScalarTypeToFloat()
Set the output scalar type to float or double, to avoid potential overflow when doing a summation ope...
void SetOrientationToX()
Set the slice direction: zero for x, 1 for y, 2 for z.
static vtkImageSlab * New()
void SetOperationToMax()
Set the operation to use when combining slices.
vtkTypeBool TrapezoidIntegration
void SetOutputScalarTypeToDouble()
Set the output scalar type to float or double, to avoid potential overflow when doing a summation ope...
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.
~vtkImageSlab() override
void SetOrientationToY()
Set the slice direction: zero for x, 1 for y, 2 for z.
void SetOutputScalarTypeToInputScalarType()
Set the output scalar type to float or double, to avoid potential overflow when doing a summation ope...
void SetOperationToMin()
Set the operation to use when combining slices.
int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Subclasses can reimplement this method to translate the update extent requests from each output port ...
vtkTypeBool MultiSliceOutput
a simple class to control print indentation
Definition vtkIndent.h:108
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