]> Creatis software - creaCLI.git/blob - ModuleCall/GenSrc/bbSlicerDicomtoNrrdConverter.h
All Slicer modules succesfully compiled into BBTK boxes :P
[creaCLI.git] / ModuleCall / GenSrc / bbSlicerDicomtoNrrdConverter.h
1 #ifndef __bbSlicerDicomtoNrrdConverter_h_INCLUDED__
2 #define __bbSlicerDicomtoNrrdConverter_h_INCLUDED__
3
4 #include "bbSlicer_EXPORT.h"
5 #include "bbtkAtomicBlackBox.h"
6
7 #include <vector>
8 #include <cstdlib>
9 #include <dlfcn.h>
10 #include <sstream>
11 #include <fstream>
12 #include <iostream>
13
14 #include <ModuleDescriptionUtilities.h>
15 #include <ModuleDescriptionParser.h>
16 #include <ModuleParameterGroup.h>
17 #include <ModuleDescription.h>
18 #include <ModuleParameter.h>
19
20 #include "CreationTool.h"
21
22 namespace bbSlicer {
23
24     class bbSlicer_EXPORT DicomtoNrrdConverter
25     :
26     public bbtk::AtomicBlackBox {
27         BBTK_BLACK_BOX_INTERFACE ( DicomtoNrrdConverter , bbtk::AtomicBlackBox ) ;
28
29         // GENERATED ARGS        
30         
31 BBTK_DECLARE_INPUT ( inputDicomDirectory , std::string );
32 BBTK_DECLARE_INPUT ( outputDirectory , std::string );
33 BBTK_DECLARE_INPUT ( outputVolume , std::string );
34 BBTK_DECLARE_INPUT ( smallGradientThreshold , double );
35 BBTK_DECLARE_INPUT ( writeProtocolGradientsFile , bool );
36 BBTK_DECLARE_INPUT ( useIdentityMeaseurementFrame , bool );
37 BBTK_DECLARE_INPUT ( useBMatrixGradientDirections , bool );
38
39         // EO GENERATED ARGS
40
41         BBTK_PROCESS ( Process ) ;
42         void Process ( ) ;
43     private:
44         void execute ( std::string lib , int _argc , char * _argv[] ) ;
45     } ;
46
47     BBTK_BEGIN_DESCRIBE_BLACK_BOX ( DicomtoNrrdConverter , bbtk::AtomicBlackBox ) ;
48     BBTK_NAME ( "DicomtoNrrdConverter" ) ;
49     BBTK_AUTHOR ( "Xiaodong Tao" ) ;
50     BBTK_DESCRIPTION ( "Converts diffusion weighted MR images in dicom series into Nrrd format for analysis in Slicer. This program has been tested on only a limited subset of DTI dicom formats available from Siemens, GE, and Phillips scanners. Work in progress to support dicom multi-frame data. The program parses dicom header to extract necessary information about measurement frame, diffusion weighting directions, b-values, etc, and write out a nrrd image. For non-diffusion weighted dicom images, it loads in an entire dicom series and writes out a single dicom volume in a .nhdr/.raw pair." ) ;
51     BBTK_CATEGORY ( "Converters" ) ;
52
53     // GENERATED DESCRPTION
54     
55 BBTK_INPUT(DicomtoNrrdConverter , inputDicomDirectory , "inputDicomDirectory" , std::string, "");
56 BBTK_INPUT(DicomtoNrrdConverter , outputDirectory , "outputDirectory" , std::string, "");
57 BBTK_INPUT(DicomtoNrrdConverter , outputVolume , "outputVolume" , std::string, "");
58 BBTK_INPUT(DicomtoNrrdConverter , smallGradientThreshold , "smallGradientThreshold" , double, "");
59 BBTK_INPUT(DicomtoNrrdConverter , writeProtocolGradientsFile , "writeProtocolGradientsFile" , bool, "");
60 BBTK_INPUT(DicomtoNrrdConverter , useIdentityMeaseurementFrame , "useIdentityMeaseurementFrame" , bool, "");
61 BBTK_INPUT(DicomtoNrrdConverter , useBMatrixGradientDirections , "useBMatrixGradientDirections" , bool, "");
62
63     // EO GENERATED DESCRIPTION
64
65     BBTK_END_DESCRIBE_BLACK_BOX ( DicomtoNrrdConverter ) ;
66 }
67
68 #endif // __bbSlicerDicomtoNrrdConverter_h_INCLUDED__
69
70