+ if (am->ArgMgrDefined("debug"))
+ GDCM_NAME_SPACE::Debug::DebugOn();
+
+ std::string fileOut = am->ArgMgrGetString("fileout",(char *)"WriteDicomSimple.dcm");
+ SIZE_X = am->ArgMgrGetInt("NX", 128);
+ SIZE_Y = am->ArgMgrGetInt("NY", 128);
+ COMPONENT = am->ArgMgrGetInt("components", 1);
+ COMPONENT_SIZE = am->ArgMgrGetInt("size", 1);
+
+ /* if unused Param we give up */
+ if ( am->ArgMgrPrintUnusedLabels() )
+ {
+ am->ArgMgrUsage(usage);
+ delete am;
+ return 1;
+ }
+
+ delete am; // we don't need Argument Manager any longer
+
+ // ----------- End Arguments Manager ---------
+
+
+// Step 1 : Create an empty GDCM_NAME_SPACE::FileHelper for the image
+// (it deals with the acces to the pixels)
+ GDCM_NAME_SPACE::FileHelper *fileH = GDCM_NAME_SPACE::FileHelper::New();
+
+// Get the empty GDCM_NAME_SPACE::File of the image
+// (it deals with the 'entries' od the image header)
+ GDCM_NAME_SPACE::File *header = fileH->GetFile();
+