1 #include "bbTransform3DdicomMetaImageWriter_DicomInfo.h"
2 #include "bbTransform3DdicomPackage.h"
3 namespace bbTransform3Ddicom
6 BBTK_ADD_BLACK_BOX_TO_PACKAGE(Transform3Ddicom,MetaImageWriter_DicomInfo)
7 BBTK_BLACK_BOX_IMPLEMENTATION(MetaImageWriter_DicomInfo,bbtk::AtomicBlackBox);
8 void MetaImageWriter_DicomInfo::Process()
11 FILE *ff = fopen( bbGetInputFilename().c_str() ,"w+");
12 fprintf(ff, "ImagaPositionPatient %f %f %f", bbGetInputIPP()[0], bbGetInputIPP()[1], bbGetInputIPP()[2]);
13 fprintf(ff, "ImageOrientationPatient %f %f %f %f %f %f", bbGetInputIOP()[0], bbGetInputIOP()[1], bbGetInputIOP()[2], bbGetInputIOP()[3], bbGetInputIOP()[4], bbGetInputIOP()[5]);
14 fprintf(ff, "Spacing %f %f %f", bbGetInputPixelSpacing()[0], bbGetInputPixelSpacing()[1], bbGetInputPixelSpacing()[2]);
19 void MetaImageWriter_DicomInfo::bbUserConstructor()
21 bbSetInputFilename("");
23 void MetaImageWriter_DicomInfo::bbUserCopyConstructor(bbtk::BlackBox::Pointer)
26 void MetaImageWriter_DicomInfo::bbUserDestructor()
34 // 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)
36 void MetaImageWriter_DicomInfo::bbUserSetDefaultValues()
38 bbSetInputFilename("");
45 // 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)
47 void MetaImageWriter_DicomInfo::bbUserInitializeProcessing()
50 // THE INITIALIZATION METHOD BODY :
52 // but this is where you should allocate the internal/output pointers
58 // 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)
60 void MetaImageWriter_DicomInfo::bbUserFinalizeProcessing()
63 // THE FINALIZATION METHOD BODY :
65 // but this is where you should desallocate the internal/output pointers
74 // EO namespace bbTransform3Ddicom