]> Creatis software - creaVtk.git/blob - bbtk_creaVtk_PKG/src/bbcreaVtkReadMHDPlane.h
#2711 creaVtk Feature New Normal - new Box ReadMHDPlane
[creaVtk.git] / bbtk_creaVtk_PKG / src / bbcreaVtkReadMHDPlane.h
1 //===== 
2 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
3 //===== 
4 #ifndef __bbcreaVtkReadMHDPlane_h_INCLUDED__
5 #define __bbcreaVtkReadMHDPlane_h_INCLUDED__
6
7
8 #include "bbcreaVtk_EXPORT.h"
9 #include "bbtkAtomicBlackBox.h"
10 #include "iostream"
11
12 #include "vtkImageData.h"
13 #include "vtkMetaImageReader.h"
14
15 namespace bbcreaVtk
16 {
17
18 class bbcreaVtk_EXPORT ReadMHDPlane
19  : 
20    public bbtk::AtomicBlackBox
21 {
22   BBTK_BLACK_BOX_INTERFACE(ReadMHDPlane,bbtk::AtomicBlackBox);
23 //===== 
24 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
25 //===== 
26   BBTK_DECLARE_INPUT(Active,bool);
27   BBTK_DECLARE_INPUT(FileName,std::string);
28   BBTK_DECLARE_INPUT(Slice,int);
29   BBTK_DECLARE_INPUT(Width,int);
30   BBTK_DECLARE_INPUT(DirectionPlane,std::string);
31   BBTK_DECLARE_INPUT(Type,int);
32   BBTK_DECLARE_OUTPUT(Out,vtkImageData*); 
33   BBTK_DECLARE_OUTPUT(Out2,vtkImageData*); 
34   BBTK_PROCESS(Process);
35         
36   vtkImageData* CreateDefaultImage();
37 // EED Borrame  void ReadNormalMHD();
38 // EED Borrame  void Read64lseek();
39   void Read64lseek(std::string,std::string plane);
40   void copy_ZX_plane(int fd,vtkImageData *newImage,int slice,int iWidth,int dimX,int dimY,int dimZ,int dataSize);
41   void copy_YZ_plane(int fd,vtkImageData *newImage,int slice,int iWidth,int dimX,int dimY,int dimZ,int dataSize);
42   vtkImageData* ChangeOrientation(vtkImageData* img);
43
44
45   void Process();
46 //===== 
47 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
48 //===== 
49 };
50
51 BBTK_BEGIN_DESCRIBE_BLACK_BOX(ReadMHDPlane,bbtk::AtomicBlackBox);
52  BBTK_NAME("ReadMHDPlane");
53  BBTK_AUTHOR("InfoDev");
54  BBTK_DESCRIPTION("No Description.");
55  BBTK_CATEGORY("empty");
56  BBTK_INPUT(ReadMHDPlane,Active,"true/false (default true)",bool,"");
57  BBTK_INPUT(ReadMHDPlane,FileName,"Image file name",std::string,"");
58  BBTK_INPUT(ReadMHDPlane,Slice,"Slice number",int,"");
59  BBTK_INPUT(ReadMHDPlane,Width,"(1 default) Number of slices to be read",int,"");
60  BBTK_INPUT(ReadMHDPlane,DirectionPlane,"Direction plane: XY (default), YZ , XZ",std::string,"");
61  BBTK_INPUT(ReadMHDPlane,Type,"(1 default) 0 = Normal mhd,  1 = lseek64",int,"");
62  BBTK_OUTPUT(ReadMHDPlane,Out,"Image 2D",vtkImageData*,"");
63  BBTK_OUTPUT(ReadMHDPlane,Out2,"Image 2D in the good orientation",vtkImageData*,"");
64 BBTK_END_DESCRIBE_BLACK_BOX(ReadMHDPlane);
65 //===== 
66 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
67 //===== 
68 }
69 // EO namespace bbcreaVtk
70
71 #endif // __bbcreaVtkReadMHDPlane_h_INCLUDED__
72