VTK
vtkImageToImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkImageToImageFilter.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 =========================================================================*/
32 #ifndef __vtkImageToImageFilter_h
33 #define __vtkImageToImageFilter_h
34 
35 #include "vtkImageSource.h"
36 
37 class vtkMultiThreader;
38 
40 {
41 public:
43  void PrintSelf(ostream& os, vtkIndent indent);
44 
46 
47  virtual void SetInput(vtkImageData *input);
48  vtkImageData *GetInput();
50 
52 
53  void SetBypass( int ) {};
54  void BypassOn() {};
55  void BypassOff() {};
56  vtkGetMacro(Bypass,int);
58 
60 
64  virtual void ThreadedExecute(vtkImageData *inData,
65  vtkImageData *outData,
66  int extent[6], int threadId);
68 
70 
71  vtkSetClampMacro( NumberOfThreads, int, 1, VTK_MAX_THREADS );
72  vtkGetMacro( NumberOfThreads, int );
74 
76  {vtkErrorMacro( << "SetInputMemoryLimit is obsolete: Use a vtkImageDataStreamer instead!" );};
78  {vtkErrorMacro( << "GetInputMemoryLimit is obsolete: Use a vtkImageDataStreamer instead!" ); return 0;};
79 
81 
82  virtual int SplitExtent(int splitExt[6], int startExt[6],
83  int num, int total);
85 
86 protected:
89 
91  int Bypass;
94 
95  // This is called by the superclass.
96  void ExecuteInformation();
97  // This is the method you should override.
98  virtual void ExecuteInformation(vtkImageData *inData, vtkImageData *outData);
99 
100  // This is called by the superclass.
101  // This is the method you should override.
102  void ExecuteData(vtkDataObject *output);
103 
104  // This also copies other arrays from point and cell data from input to output.
106 
107  // The method that starts the multithreading
108  void MultiThread(vtkImageData *input, vtkImageData *output);
109 
110  void ComputeInputUpdateExtents( vtkDataObject *output );
111  virtual void ComputeInputUpdateExtent(int inExt[6], int outExt[6]);
112 
114  vtkSetStringMacro(InputScalarsSelection);
115 
116  virtual int FillInputPortInformation(int, vtkInformation*);
117 
118 private:
119  vtkImageToImageFilter(const vtkImageToImageFilter&); // Not implemented.
120  void operator=(const vtkImageToImageFilter&); // Not implemented.
121 };
122 
123 #endif
124 
125 
126 
127 
128 
129 
130 
Store vtkAlgorithm input/output information.
#define VTK_FILTERING_EXPORT
A class for performing multithreaded execution.
Generic filter that has one input of type vtkImageData.
virtual vtkImageData * AllocateOutputData(vtkDataObject *out)
a simple class to control print indentation
Definition: vtkIndent.h:37
topologically and geometrically regular array of data
Definition: vtkImageData.h:43
vtkMultiThreader * Threader
Source of data for the imaging pipeline.
void PrintSelf(ostream &os, vtkIndent indent)
helper class to get VTK data object types as string and instantiate them