--- /dev/null
+#include "bbSlicerCreateaDICOMSeries.h"
+#include "bbSlicerPackage.h"
+
+namespace bbSlicer {
+ BBTK_ADD_BLACK_BOX_TO_PACKAGE ( Slicer, CreateaDICOMSeries )
+ BBTK_BLACK_BOX_IMPLEMENTATION ( CreateaDICOMSeries, bbtk::AtomicBlackBox );
+
+ void CreateaDICOMSeries::Process ( ) {
+
+ // GENERATED
+
+int _argc =20;
+std::string lib = "/home/riveros/.slicer/Slicer4-bin/Slicer-build/lib/Slicer-4.0/cli-modules/libImageReadDicomWriteLib.so";
+char * _argv[ ] = { Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--patientName" ) + Mthd::Aux::replace_str ( ( Mthd::Aux::toString( bbGetInputpatientName( ) ) ) ,"@@@@@"," --patientName ") ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--patientID" ) + Mthd::Aux::replace_str ( ( Mthd::Aux::toString( bbGetInputpatientID( ) ) ) ,"@@@@@"," --patientID ") ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--patientComments" ) + Mthd::Aux::replace_str ( ( Mthd::Aux::toString( bbGetInputpatientComments( ) ) ) ,"@@@@@"," --patientComments ") ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--studyID" ) + Mthd::Aux::replace_str ( ( Mthd::Aux::toString( bbGetInputstudyID( ) ) ) ,"@@@@@"," --studyID ") ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--studyDate" ) + Mthd::Aux::replace_str ( ( Mthd::Aux::toString( bbGetInputstudyDate( ) ) ) ,"@@@@@"," --studyDate ") ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--studyComments" ) + Mthd::Aux::replace_str ( ( Mthd::Aux::toString( bbGetInputstudyComments( ) ) ) ,"@@@@@"," --studyComments ") ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--studyDescription" ) + Mthd::Aux::replace_str ( ( Mthd::Aux::toString( bbGetInputstudyDescription( ) ) ) ,"@@@@@"," --studyDescription ") ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--modality" ) + Mthd::Aux::replace_str ( ( Mthd::Aux::toString( bbGetInputmodality( ) ) ) ,"@@@@@"," --modality ") ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--manufacturer" ) + Mthd::Aux::replace_str ( ( Mthd::Aux::toString( bbGetInputmanufacturer( ) ) ) ,"@@@@@"," --manufacturer ") ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--model" ) + Mthd::Aux::replace_str ( ( Mthd::Aux::toString( bbGetInputmodel( ) ) ) ,"@@@@@"," --model ") ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--seriesNumber" ) + Mthd::Aux::replace_str ( ( Mthd::Aux::toString( bbGetInputseriesNumber( ) ) ) ,"@@@@@"," --seriesNumber ") ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--seriesDescription" ) + Mthd::Aux::replace_str ( ( Mthd::Aux::toString( bbGetInputseriesDescription( ) ) ) ,"@@@@@"," --seriesDescription ") ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--rescaleIntercept" ) + Mthd::Aux::replace_str ( ( Mthd::Aux::toString( bbGetInputrescaleIntercept( ) ) ) ,"@@@@@"," --rescaleIntercept ") ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--rescaleSlope" ) + Mthd::Aux::replace_str ( ( Mthd::Aux::toString( bbGetInputrescaleSlope( ) ) ) ,"@@@@@"," --rescaleSlope ") ),
+Mthd::Aux::toCharArrray( Mthd::Aux::replace_str ( ( Mthd::Aux::toString( bbGetInputinputVolume( ) ) ) ,"@@@@@","") ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--dicomDirectory" ) + Mthd::Aux::replace_str ( ( Mthd::Aux::toString( bbGetInputdicomDirectory( ) ) ) ,"@@@@@"," --dicomDirectory ") ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--dicomPrefix" ) + Mthd::Aux::replace_str ( ( Mthd::Aux::toString( bbGetInputdicomPrefix( ) ) ) ,"@@@@@"," --dicomPrefix ") ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--dicomNumberFormat" ) + Mthd::Aux::replace_str ( ( Mthd::Aux::toString( bbGetInputdicomNumberFormat( ) ) ) ,"@@@@@"," --dicomNumberFormat ") ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--reverseImages" ) + Mthd::Aux::replace_str ( ( Mthd::Aux::toString( bbGetInputreverseImages( ) ) ) ,"@@@@@"," --reverseImages ") ),
+Mthd::Aux::toCharArrray( Mthd::Aux::toString( "--useCompression" ) + Mthd::Aux::replace_str ( ( Mthd::Aux::toString( bbGetInputuseCompression( ) ) ) ,"@@@@@"," --useCompression ") ) };
+
+ // EO GENERATED
+ this->execute( lib, _argc, _argv );
+
+ }
+
+ void CreateaDICOMSeries::execute ( std::string lib, int _argc, char * _argv[] ) {
+ void* handle = dlopen( lib.c_str( ), RTLD_NOW | RTLD_GLOBAL );
+ if ( ! handle ) {
+ std::cerr << "CAN'T OPEN LIBRARY: " << dlerror( ) << '\n';
+ return;
+ }
+ typedef int (*method_t )( int argc, char * argv[] );
+ // RESET ERROR
+ dlerror( );
+ // PROTOTYPE
+ method_t myMethod = ( method_t ) dlsym( handle, "ModuleEntryPoint" );
+ const char *dlsym_error = dlerror( );
+ if ( dlsym_error ) {
+ std::cerr << "CAN'T LOAD SYMBOL 'ModuleEntryPoint':" << dlsym_error << '\n';
+ dlclose( handle );
+ return;
+ }
+ // METHOD CALL
+ myMethod( _argc, _argv );
+ // CLOSING LIB
+ dlclose( handle );
+ }
+
+ void CreateaDICOMSeries::bbUserSetDefaultValues ( ) {
+ }
+
+ void CreateaDICOMSeries::bbUserInitializeProcessing ( ) {
+ }
+
+ void CreateaDICOMSeries::bbUserFinalizeProcessing ( ) {
+ }
+}
+// EO namespace bbSlicer
+
+