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 
31 VTK_ABI_NAMESPACE_BEGIN
32 class VTKIMAGINGCORE_EXPORT vtkImageClip : public vtkImageAlgorithm
33 {
34 public:
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);
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 
62 protected:
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 
79 private:
80  vtkImageClip(const vtkImageClip&) = delete;
81  void operator=(const vtkImageClip&) = delete;
82 };
83 
84 VTK_ABI_NAMESPACE_END
85 #endif
Generic algorithm superclass for image algs.
Reduces the image extent of the input.
Definition: vtkImageClip.h:33
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.
static vtkImageClip * New()
~vtkImageClip() override=default
vtkTimeStamp CTime
Definition: vtkImageClip.h:67
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int * GetOutputWholeExtent()
The whole extent of the output has to be set explicitly.
Definition: vtkImageClip.h:46
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Subclasses can reimplement this method to collect information from their inputs and set information f...
void SetOutputWholeExtent(int extent[6], vtkInformation *outInfo=nullptr)
The whole extent of the output has to be set explicitly.
vtkTypeBool ClipData
Definition: vtkImageClip.h:71
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
Definition: vtkImageData.h:43
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
Definition: vtkTimeStamp.h:25
@ extent
Definition: vtkX3D.h:345
int vtkTypeBool
Definition: vtkABI.h:64
#define VTK_SIZEHINT(...)