]> Creatis software - bbtk.git/blob - packages/vtk/src/bbvtkMIPCreator.h
28f43583f28ecfe32822c7f114e9aca6a96b8297
[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/04/18 12:59:52 $
7   Version:   $Revision: 1.3 $
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     void Init();
70   private:
71     vtkImageShiftScale* mCast;
72     vtkVolumeRayCastMIPFunction* mMIP;
73     vtkVolumeRayCastMapper* mMapper;
74     vtkVolume* mVolume;
75   };
76    
77   //=================================================================
78   // UserBlackBox description
79   BBTK_BEGIN_DESCRIBE_BLACK_BOX(MIPCreator,bbtk::AtomicBlackBox);
80   BBTK_NAME("MIPCreator");
81   BBTK_AUTHOR("laurent.guigues@creatis.insa-lyon.fr");
82   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)");
83   BBTK_CATEGORY("3D object creator");
84   BBTK_INPUT(MIPCreator,Shift,"Gray scale shift",int,"");
85   BBTK_INPUT(MIPCreator,Scale,"Gray scale scaling",float,"");
86   BBTK_INPUT(MIPCreator,In,"Input Image",vtkImageData *,"");
87   BBTK_OUTPUT(MIPCreator,Out,"MIP object to plug into a 3D viewer",vtkProp3D*,"");
88   BBTK_END_DESCRIBE_BLACK_BOX(MIPCreator);
89   //=================================================================
90
91
92 }//namespace bbvtk
93
94 #endif  //__bbtvtkMIPCreator_h__
95
96 #endif //_USE_VTK_
97