VTK  9.3.0
vtkImageClip.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
22#ifndef vtkImageClip_h
23#define vtkImageClip_h
24
25// I did not make this a subclass of in place filter because
26// the references on the data do not matter. I make no modifications
27// to the data.
28#include "vtkImageAlgorithm.h"
29#include "vtkImagingCoreModule.h" // For export macro
30
31VTK_ABI_NAMESPACE_BEGIN
32class VTKIMAGINGCORE_EXPORT vtkImageClip : public vtkImageAlgorithm
33{
34public:
35 static vtkImageClip* New();
37 void PrintSelf(ostream& os, vtkIndent indent) override;
38
40
43 void SetOutputWholeExtent(int extent[6], vtkInformation* outInfo = nullptr);
44 void SetOutputWholeExtent(int minX, int maxX, int minY, int maxY, int minZ, int maxZ);
45 void GetOutputWholeExtent(int extent[6]);
46 int* GetOutputWholeExtent() VTK_SIZEHINT(6) { return this->OutputWholeExtent; }
48
50
52
57 vtkSetMacro(ClipData, vtkTypeBool);
58 vtkGetMacro(ClipData, vtkTypeBool);
59 vtkBooleanMacro(ClipData, vtkTypeBool);
61
62protected:
64 ~vtkImageClip() override = default;
65
66 // Time when OutputImageExtent was computed.
68 int Initialized; // Set the OutputImageExtent for the first time.
69 int OutputWholeExtent[6];
70
72
74
75 void CopyData(vtkImageData* inData, vtkImageData* outData, int* ext);
76
78
79private:
80 vtkImageClip(const vtkImageClip&) = delete;
81 void operator=(const vtkImageClip&) = delete;
82};
83
84VTK_ABI_NAMESPACE_END
85#endif
Generic algorithm superclass for image algs.
Reduces the image extent of the input.
static vtkImageClip * New()
void CopyData(vtkImageData *inData, vtkImageData *outData, int *ext)
void ResetOutputWholeExtent()
void SetOutputWholeExtent(int minX, int maxX, int minY, int maxY, int minZ, int maxZ)
The whole extent of the output has to be set explicitly.
void GetOutputWholeExtent(int extent[6])
The whole extent of the output has to be set explicitly.
~vtkImageClip() override=default
vtkTimeStamp CTime
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Subclasses can reimplement this method to collect information from their inputs and set information f...
int * GetOutputWholeExtent()
The whole extent of the output has to be set explicitly.
void SetOutputWholeExtent(int extent[6], vtkInformation *outInfo=nullptr)
The whole extent of the output has to be set explicitly.
vtkTypeBool ClipData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called in response to a REQUEST_DATA request from the executive.
topologically and geometrically regular array of data
a simple class to control print indentation
Definition vtkIndent.h:29
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
record modification and/or execution time
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_SIZEHINT(...)