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
31#ifndef vtkImageClip_h
32#define vtkImageClip_h
33
34// I did not make this a subclass of in place filter because
35// the references on the data do not matter. I make no modifications
36// to the data.
37#include "vtkImageAlgorithm.h"
38#include "vtkImagingCoreModule.h" // For export macro
39
40VTK_ABI_NAMESPACE_BEGIN
41class VTKIMAGINGCORE_EXPORT vtkImageClip : public vtkImageAlgorithm
42{
43public:
44 static vtkImageClip* New();
46 void PrintSelf(ostream& os, vtkIndent indent) override;
47
49
52 void SetOutputWholeExtent(int extent[6], vtkInformation* outInfo = nullptr);
53 void SetOutputWholeExtent(int minX, int maxX, int minY, int maxY, int minZ, int maxZ);
54 void GetOutputWholeExtent(int extent[6]);
55 int* GetOutputWholeExtent() VTK_SIZEHINT(6) { return this->OutputWholeExtent; }
57
59
61
66 vtkSetMacro(ClipData, vtkTypeBool);
67 vtkGetMacro(ClipData, vtkTypeBool);
68 vtkBooleanMacro(ClipData, vtkTypeBool);
70
71protected:
73 ~vtkImageClip() override = default;
74
75 // Time when OutputImageExtent was computed.
77 int Initialized; // Set the OutputImageExtent for the first time.
78 int OutputWholeExtent[6];
79
81
83
84 void CopyData(vtkImageData* inData, vtkImageData* outData, int* ext);
85
87
88private:
89 vtkImageClip(const vtkImageClip&) = delete;
90 void operator=(const vtkImageClip&) = delete;
91};
92
93VTK_ABI_NAMESPACE_END
94#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:38
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(...)