1 #ifndef __CPEXTENSIONS__VISUALIZATION__IMAGEBLENDER__H__
2 #define __CPEXTENSIONS__VISUALIZATION__IMAGEBLENDER__H__
4 #include <cpExtensions/cpExtensions_Export.h>
9 #include <vtkThreadedImageAlgorithm.h>
11 namespace cpExtensions
13 namespace Visualization
17 class cpExtensions_EXPORT ImageBlender
18 : public vtkThreadedImageAlgorithm
21 typedef ImageBlender Self;
22 vtkTypeMacro( ImageBlender, vtkThreadedImageAlgorithm );
24 vtkGetMacro( MaxWindow, double );
25 vtkGetMacro( MaxLevel, double );
26 vtkGetMacro( MinWindow, double );
27 vtkGetMacro( MinLevel, double );
28 vtkGetMacro( Window, double );
29 vtkGetMacro( Level, double );
31 vtkSetMacro( MaxWindow, double );
32 vtkSetMacro( MaxLevel, double );
33 vtkSetMacro( MinWindow, double );
34 vtkSetMacro( MinLevel, double );
35 vtkSetMacro( Window, double );
36 vtkSetMacro( Level, double );
40 void PrintSelf( std::ostream& os, vtkIndent indent );
42 unsigned int GetNumberOfImages( ) const;
43 void SetWindowLevel( const double& w, const double& l );
46 const unsigned int& i,
52 const unsigned int& i,
60 virtual ~ImageBlender( );
62 int RequestInformation(
63 vtkInformation* request,
64 vtkInformationVector** inputVector,
65 vtkInformationVector* outputVector
67 void ThreadedRequestData(
68 vtkInformation* request,
69 vtkInformationVector** inputVector,
70 vtkInformationVector* outputVector,
71 vtkImageData*** inData,
72 vtkImageData** outData,
73 int outExt[ 6 ], int id
75 int FillInputPortInformation( int i, vtkInformation* info );
78 vtkImageData** inDatas,
80 vtkImageData* outData,
86 // Purposely not implemented.
87 ImageBlender( const Self& other );
88 void operator=( const Self& other );
95 const double& r = double( 1 ),
96 const double& g = double( 0 ),
97 const double& b = double( 0 )
103 this->N = std::sqrt( ( r * r ) + ( g * g ) + ( b * b ) );
106 mutable std::map< unsigned int, TColor > Colors;
124 #endif // __CPEXTENSIONS__VISUALIZATION__IMAGEBLENDER__H__