VTK  9.3.20240424
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
51#ifndef vtkImageClip_h
52#define vtkImageClip_h
53
54// I did not make this a subclass of in place filter because
55// the references on the data do not matter. I make no modifications
56// to the data.
57#include "vtkImageAlgorithm.h"
58#include "vtkImagingCoreModule.h" // For export macro
59
60VTK_ABI_NAMESPACE_BEGIN
61class VTKIMAGINGCORE_EXPORT vtkImageClip : public vtkImageAlgorithm
62{
63public:
64 static vtkImageClip* New();
66 void PrintSelf(ostream& os, vtkIndent indent) override;
67
69
72 void SetOutputWholeExtent(int extent[6], vtkInformation* outInfo = nullptr);
73 void SetOutputWholeExtent(int minX, int maxX, int minY, int maxY, int minZ, int maxZ);
74 void GetOutputWholeExtent(int extent[6]);
75 int* GetOutputWholeExtent() VTK_SIZEHINT(6) { return this->OutputWholeExtent; }
77
79
81
86 vtkSetMacro(ClipData, vtkTypeBool);
87 vtkGetMacro(ClipData, vtkTypeBool);
88 vtkBooleanMacro(ClipData, vtkTypeBool);
90
91protected:
93 ~vtkImageClip() override = default;
94
95 // Time when OutputImageExtent was computed.
97 int Initialized; // Set the OutputImageExtent for the first time.
98 int OutputWholeExtent[6];
99
101
103
104 void CopyData(vtkImageData* inData, vtkImageData* outData, int* ext);
105
107
108private:
109 vtkImageClip(const vtkImageClip&) = delete;
110 void operator=(const vtkImageClip&) = delete;
111};
112
113VTK_ABI_NAMESPACE_END
114#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:108
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(...)