]> Creatis software - cpPlugins.git/blob - lib/cpExtensions/Algorithms/ImageBlender.h
...
[cpPlugins.git] / lib / cpExtensions / Algorithms / ImageBlender.h
1 #ifndef __cpExtensions__Algorithms__ImageBlender__h__
2 #define __cpExtensions__Algorithms__ImageBlender__h__
3
4 #include <cpExtensions/Config.h>
5 #include <vtkThreadedImageAlgorithm.h>
6 #include <vector>
7
8 namespace cpExtensions
9 {
10   namespace Algorithms
11   {
12     /**
13      * @note: Based on vtkImageWeightedSum
14      */
15     class cpExtensions_EXPORT ImageBlender
16       : public vtkThreadedImageAlgorithm
17     {
18     public:
19       typedef ImageBlender Self;
20       vtkTypeMacro( ImageBlender, vtkThreadedImageAlgorithm );
21
22     public:
23       static Self* New( );
24
25       unsigned int GetNumberOfInputs( );
26
27     protected:
28       ImageBlender( );
29       virtual ~ImageBlender( );
30
31       int RequestInformation(
32         vtkInformation* request,
33         vtkInformationVector** inputVector,
34         vtkInformationVector* outputVector
35         );
36       int RequestData(
37         vtkInformation* request,
38         vtkInformationVector** inputVector,
39         vtkInformationVector* outputVector
40         );
41       void ThreadedRequestData(
42         vtkInformation* request,
43         vtkInformationVector** inputVector,
44         vtkInformationVector* outputVector,
45         vtkImageData*** inData, vtkImageData** outData,
46         int outExt[ 6 ], int id
47         );
48       int FillInputPortInformation( int i, vtkInformation* info );
49
50     private:
51       // Purposely not implemented.
52       ImageBlender( const Self& other );
53       void operator=( const Self& other );
54
55     protected:
56       std::vector< double > m_Ranges;
57     };
58
59   } // ecapseman
60
61 } // ecapseman
62
63 #endif // __cpExtensions__Algorithms__ImageBlender__h__
64
65 // eof - $RCSfile$