X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=bbtk_creaVtk_PKG%2Fsrc%2FbbcreaVtkReadMHDPlane.h;h=5b94b9554b7586236ab678af29d5c49b70c81815;hb=0fe587457cf4d6eda506990f92a35796ad6ef7cc;hp=5ea1c962f337383375c60309ece42381bf0007dd;hpb=f8d49703f81fabb8a2689727765a487302ce34a9;p=creaVtk.git diff --git a/bbtk_creaVtk_PKG/src/bbcreaVtkReadMHDPlane.h b/bbtk_creaVtk_PKG/src/bbcreaVtkReadMHDPlane.h index 5ea1c96..5b94b95 100644 --- a/bbtk_creaVtk_PKG/src/bbcreaVtkReadMHDPlane.h +++ b/bbtk_creaVtk_PKG/src/bbcreaVtkReadMHDPlane.h @@ -3,6 +3,12 @@ //===== #ifndef __bbcreaVtkReadMHDPlane_h_INCLUDED__ #define __bbcreaVtkReadMHDPlane_h_INCLUDED__ + + + + + + #include "bbcreaVtk_EXPORT.h" #include "bbtkAtomicBlackBox.h" #include "iostream" @@ -23,8 +29,19 @@ class bbcreaVtk_EXPORT ReadMHDPlane //===== BBTK_DECLARE_INPUT(FileName,std::string); BBTK_DECLARE_INPUT(Slice,int); + BBTK_DECLARE_INPUT(Width,int); + BBTK_DECLARE_INPUT(DirectionPlane,std::string); + BBTK_DECLARE_INPUT(Type,int); BBTK_DECLARE_OUTPUT(Out,vtkImageData*); BBTK_PROCESS(Process); + + vtkImageData* CreateDefaultImage(); + void ReadNormalMHD(); + void Read64lseek(); + void copy_XZ_plane(int fd,vtkImageData *newImage,int slice,int iWidth,int dimX,int dimY,int dimZ,int dataSize); + void copy_YZ_plane(int fd,vtkImageData *newImage,int slice,int iWidth,int dimX,int dimY,int dimZ,int dataSize); + + void Process(); //===== // 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) @@ -38,6 +55,9 @@ BBTK_BEGIN_DESCRIBE_BLACK_BOX(ReadMHDPlane,bbtk::AtomicBlackBox); BBTK_CATEGORY("empty"); BBTK_INPUT(ReadMHDPlane,FileName,"Image file name",std::string,""); BBTK_INPUT(ReadMHDPlane,Slice,"Slice number",int,""); + BBTK_INPUT(ReadMHDPlane,Width,"(1 default) Number of slices to be read",int,""); + BBTK_INPUT(ReadMHDPlane,DirectionPlane,"Direction plane: XY (default), YZ , XZ",std::string,""); + BBTK_INPUT(ReadMHDPlane,Type,"(1 default) 0 = Normal mhd, 1 = lseek64",int,""); BBTK_OUTPUT(ReadMHDPlane,Out,"Image 2D",vtkImageData*,""); BBTK_END_DESCRIBE_BLACK_BOX(ReadMHDPlane); //=====