OSDN Git Service

FIRST REPOSITORY
[eos/hostdependOTHERS.git] / I686LINUX / util / I686LINUX / include / vtk / vtkSimpleImageToImageFilter.h
1 /*=========================================================================
2
3   Program:   Visualization Toolkit
4   Module:    $RCSfile: vtkSimpleImageToImageFilter.h,v $
5   Language:  C++
6   Date:      $Date: 2002/10/04 20:43:44 $
7   Version:   $Revision: 1.11 $
8
9   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
10   All rights reserved.
11   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
12
13      This software is distributed WITHOUT ANY WARRANTY; without even 
14      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
15      PURPOSE.  See the above copyright notice for more information.
16
17 =========================================================================*/
18 // .NAME vtkSimpleImageToImageFilter - Generic image filter with one input.
19 // .SECTION Description
20 // vtkSimpleImageToImageFilter is a filter which aims to avoid much
21 // of the complexity associated with vtkImageToImageFilter (i.e.
22 // support for pieces, multi-threaded operation). If you need to write
23 // a simple image-image filter which operates on the whole input, use
24 // this as the superclass. The subclass has to provide only an execute
25 // method which takes input and output as arguments. Memory allocation
26 // is handled in vtkSimpleImageToImageFilter. Also, you are guaranteed to
27 // have a valid input in the Execute(input, output) method. By default, 
28 // this filter
29 // requests it's input's whole extent and copies the input's information
30 // (spacing, whole extent etc...) to the output. If the output's setup
31 // is different (for example, if it performs some sort of sub-sampling),
32 // ExecuteInformation has to be overwritten. As an example of how this
33 // can be done, you can look at vtkImageShrink3D::ExecuteInformation.
34 // For a complete example which uses templates to support generic data
35 // types, see  vtkSimpleFilterExample.
36
37 // .SECTION See also
38 // vtkImageToImageFilter vtkSimpleImageFilterExample
39
40 #ifndef __vtkSimpleImageToImageFilter_h
41 #define __vtkSimpleImageToImageFilter_h
42
43 #include "vtkImageSource.h"
44
45 class VTK_FILTERING_EXPORT vtkSimpleImageToImageFilter : public vtkImageSource
46 {
47 public:
48   vtkTypeRevisionMacro(vtkSimpleImageToImageFilter,vtkImageSource);
49   void PrintSelf(ostream& os, vtkIndent indent);
50
51   // Description:
52   // Set the Input of a filter. 
53   virtual void SetInput(vtkImageData *input);
54   vtkImageData *GetInput();
55   
56   
57 protected:
58   vtkSimpleImageToImageFilter();
59   ~vtkSimpleImageToImageFilter();
60
61   // These are called by the superclass.
62   // You might have to override ExecuteInformation
63   virtual void ExecuteInformation();
64   virtual void ComputeInputUpdateExtent(int inExt[6], int outExt[6]);
65
66   // You don't have to touch this unless you have a good reason.
67   virtual void ExecuteData(vtkDataObject *output);
68   // In the simplest case, this is the only method you need to define.
69   virtual void SimpleExecute(vtkImageData* input, vtkImageData* output) = 0;
70 private:
71   vtkSimpleImageToImageFilter(const vtkSimpleImageToImageFilter&);  // Not implemented.
72   void operator=(const vtkSimpleImageToImageFilter&);  // Not implemented.
73 };
74
75 #endif
76
77
78
79
80
81
82