VTK  9.0.20210124
vtkImageClip.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkImageClip.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
28 #ifndef vtkImageClip_h
29 #define vtkImageClip_h
30 
31 // I did not make this a subclass of in place filter because
32 // the references on the data do not matter. I make no modifications
33 // to the data.
34 #include "vtkImageAlgorithm.h"
35 #include "vtkImagingCoreModule.h" // For export macro
36 
37 class VTKIMAGINGCORE_EXPORT vtkImageClip : public vtkImageAlgorithm
38 {
39 public:
40  static vtkImageClip* New();
42  void PrintSelf(ostream& os, vtkIndent indent) override;
43 
45 
48  void SetOutputWholeExtent(int extent[6], vtkInformation* outInfo = nullptr);
49  void SetOutputWholeExtent(int minX, int maxX, int minY, int maxY, int minZ, int maxZ);
50  void GetOutputWholeExtent(int extent[6]);
51  int* GetOutputWholeExtent() VTK_SIZEHINT(6) { return this->OutputWholeExtent; }
53 
54  void ResetOutputWholeExtent();
55 
57 
62  vtkSetMacro(ClipData, vtkTypeBool);
63  vtkGetMacro(ClipData, vtkTypeBool);
64  vtkBooleanMacro(ClipData, vtkTypeBool);
66 
67 protected:
68  vtkImageClip();
69  ~vtkImageClip() override = default;
70 
71  // Time when OutputImageExtent was computed.
73  int Initialized; // Set the OutputImageExtent for the first time.
74  int OutputWholeExtent[6];
75 
77 
79 
80  void CopyData(vtkImageData* inData, vtkImageData* outData, int* ext);
81 
83 
84 private:
85  vtkImageClip(const vtkImageClip&) = delete;
86  void operator=(const vtkImageClip&) = delete;
87 };
88 
89 #endif
vtkImageAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called in response to a REQUEST_DATA request from the executive.
vtkImageClip::Initialized
int Initialized
Definition: vtkImageClip.h:73
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:32
vtkImageAlgorithm.h
vtkImageAlgorithm
Generic algorithm superclass for image algs.
Definition: vtkImageAlgorithm.h:37
VTK_SIZEHINT
#define VTK_SIZEHINT(...)
Definition: vtkWrappingHints.h:45
vtkImageAlgorithm::RequestInformation
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Subclasses can reimplement this method to collect information from their inputs and set information f...
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:47
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkImageClip
Reduces the image extent of the input.
Definition: vtkImageClip.h:37
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkImageAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkAlgorithm::New
static vtkAlgorithm * New()
vtkX3D::extent
Definition: vtkX3D.h:351
vtkImageClip::ClipData
vtkTypeBool ClipData
Definition: vtkImageClip.h:76
vtkImageClip::GetOutputWholeExtent
int * GetOutputWholeExtent()
Definition: vtkImageClip.h:51
vtkImageClip::CTime
vtkTimeStamp CTime
Definition: vtkImageClip.h:72
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69