00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00048 #ifdef _USE_VTK_
00049
00050
00051 #ifndef __bbvtkImagePlanes_h_INCLUDED__
00052 #define __bbvtkImagePlanes_h_INCLUDED__
00053
00054
00055 #include "bbtkAtomicBlackBox.h"
00056
00057 #include "vtkImageData.h"
00058
00059
00060
00061 #include "vtkImagePlaneWidget.h"
00062 #include "vtkCellPicker.h"
00063
00064
00065
00066
00067
00068 namespace bbvtk
00069 {
00070
00071 typedef std::vector<double> winLevel;
00072
00073 class ImagePlanes : public bbtk::AtomicBlackBox
00074 {
00075 public:
00076 BBTK_BLACK_BOX_INTERFACE(ImagePlanes,bbtk::AtomicBlackBox);
00077
00078 BBTK_DECLARE_INPUT(In,vtkImageData *);
00079 BBTK_DECLARE_INPUT(WindowLevel,winLevel);
00080 BBTK_DECLARE_OUTPUT(PlaneX,vtkImagePlaneWidget*);
00081 BBTK_DECLARE_OUTPUT(PlaneY,vtkImagePlaneWidget*);
00082 BBTK_DECLARE_OUTPUT(PlaneZ,vtkImagePlaneWidget*);
00083 BBTK_PROCESS(Process);
00084 void Process();
00085
00086 protected:
00087 virtual void bbUserConstructor();
00088 virtual void bbUserCopyConstructor();
00089 virtual void bbUserDestructor();
00090 void Init();
00091 private:
00092 vtkImagePlaneWidget* planeWidgetX;
00093 vtkImagePlaneWidget* planeWidgetY;
00094 vtkImagePlaneWidget* planeWidgetZ;
00095 };
00096
00097
00098
00099 BBTK_BEGIN_DESCRIBE_BLACK_BOX(ImagePlanes,bbtk::AtomicBlackBox);
00100 BBTK_NAME("ImagePlanes");
00101 BBTK_AUTHOR("laurent.guigues@creatis.insa-lyon.fr");
00102 BBTK_DESCRIPTION("Creates three 3D planes with the input image mapped onto with which the user can interact. The output vtkImagePlaneWidget objects are to be inserted into a 3D scene (e.g. a Viewer3D)");
00103 BBTK_CATEGORY("3D object creator");
00104 BBTK_INPUT(ImagePlanes,In,"Input Image",vtkImageData *,"");
00105 BBTK_INPUT(ImagePlanes,WindowLevel,"Widdow Level",winLevel,"");
00106 BBTK_OUTPUT(ImagePlanes,PlaneX,"The image plane in X direction",vtkImagePlaneWidget*,"");
00107 BBTK_OUTPUT(ImagePlanes,PlaneY,"The image plane in Y direction",vtkImagePlaneWidget*,"");
00108 BBTK_OUTPUT(ImagePlanes,PlaneZ,"The image plane in Z direction",vtkImagePlaneWidget*,"");
00109 BBTK_END_DESCRIBE_BLACK_BOX(ImagePlanes);
00110
00111
00112
00113
00114
00115
00116 }
00117
00118 #endif //__bbtvtkImagePlanes_h__
00119
00120 #endif //_USE_VTK_
00121