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