]> Creatis software - bbtk.git/blob - packages/vtk/src/bbvtkMIPCreator.h
1dbebde6ae0e4704becb0182ed699ceae0b48cec
[bbtk.git] / packages / vtk / src / bbvtkMIPCreator.h
1 /*=========================================================================
2                                                                                 
3   Program:   bbtk
4   Module:    $RCSfile: bbvtkMIPCreator.h,v $
5   Language:  C++
6   Date:      $Date: 2008/05/09 10:39:47 $
7   Version:   $Revision: 1.4 $
8                                                                                 
9   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
10   l'Image). All rights reserved. See Doc/License.txt or
11   http://www.creatis.insa-lyon.fr/Public/bbtk/License.html 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 notices for more information.
16                                                                                 
17 =========================================================================*//**
18  * \brief Short description in one line
19  * 
20  * Long description which 
21  * can span multiple lines
22  */
23 /**
24  * \file 
25  * \brief Pattern for the definition of a new type of Node (header)
26  */
27 /**
28  * \class bbtk::NodePatern 
29  * \brief Pattern for the definition of a new type of Node 
30  */
31
32
33 #ifdef _USE_VTK_
34
35
36 #ifndef __bbvtkMIPCreator_h_INCLUDED__
37 #define __bbvtkMIPCreator_h_INCLUDED__
38
39
40 #include "bbtkAtomicBlackBox.h"
41
42 #include "vtkImageData.h"
43 #include <vtkImageShiftScale.h>
44 #include <vtkVolumeRayCastMIPFunction.h>
45 #include <vtkVolumeRayCastMapper.h>
46 #include "vtkProp3D.h"
47 #include "vtkVolume.h"
48
49 namespace bbvtk
50 {
51
52
53   
54   class /*BBTK_EXPORT*/ MIPCreator : public bbtk::AtomicBlackBox
55   { 
56   public:
57     BBTK_BLACK_BOX_INTERFACE(MIPCreator,bbtk::AtomicBlackBox);
58     //    BBTK_DECLARE_INPUT(Contour,int);
59     BBTK_DECLARE_INPUT(In,vtkImageData *);
60     BBTK_DECLARE_INPUT(Shift,int);
61     BBTK_DECLARE_INPUT(Scale,float);
62     BBTK_DECLARE_OUTPUT(Out,vtkProp3D*);
63     BBTK_PROCESS(Process);
64     void Process();
65     
66   protected:
67     virtual void bbUserConstructor();
68     virtual void bbUserCopyConstructor();
69     virtual void bbUserDestructor();
70     void Init();
71   private:
72     vtkImageShiftScale* mCast;
73     vtkVolumeRayCastMIPFunction* mMIP;
74     vtkVolumeRayCastMapper* mMapper;
75     vtkVolume* mVolume;
76   };
77    
78   //=================================================================
79   // UserBlackBox description
80   BBTK_BEGIN_DESCRIBE_BLACK_BOX(MIPCreator,bbtk::AtomicBlackBox);
81   BBTK_NAME("MIPCreator");
82   BBTK_AUTHOR("laurent.guigues@creatis.insa-lyon.fr");
83   BBTK_DESCRIPTION("Creates a Maximum Intensity Projection (MIP) view of a 3D image. Creates a vtkProp3D object to insert into a 3D scene (e.g. a Viewer3D)");
84   BBTK_CATEGORY("3D object creator");
85   BBTK_INPUT(MIPCreator,Shift,"Gray scale shift",int,"");
86   BBTK_INPUT(MIPCreator,Scale,"Gray scale scaling",float,"");
87   BBTK_INPUT(MIPCreator,In,"Input Image",vtkImageData *,"");
88   BBTK_OUTPUT(MIPCreator,Out,"MIP object to plug into a 3D viewer",vtkProp3D*,"");
89   BBTK_END_DESCRIBE_BLACK_BOX(MIPCreator);
90   //=================================================================
91
92
93 }//namespace bbvtk
94
95 #endif  //__bbtvtkMIPCreator_h__
96
97 #endif //_USE_VTK_
98