1 #include "bbTransform3DdicomTransformSimple.h"
2 #include "bbTransform3DdicomPackage.h"
6 namespace bbTransform3Ddicom
9 BBTK_ADD_BLACK_BOX_TO_PACKAGE(Transform3Ddicom,TransformSimple)
10 BBTK_BLACK_BOX_IMPLEMENTATION(TransformSimple,bbtk::AtomicBlackBox);
11 void TransformSimple::Process()
13 vtkImageData *resultImage = NULL;
14 vtkTransform *transform = NULL;
15 if ( bbGetInputInImage()!=NULL )
17 creaimage->SetvtkImageData( bbGetInputInImage() );
18 creaimage->SetImagePositionPatient( bbGetInputIPP()[0] , bbGetInputIPP()[1] , bbGetInputIPP()[2] );
19 creaimage->SetImageSpacing( bbGetInputPixelSpacing()[0] , bbGetInputPixelSpacing()[1] , bbGetInputPixelSpacing()[2] );
20 creaimage->SetImageOrientation( bbGetInputIOP()[0] , bbGetInputIOP()[1] , bbGetInputIOP()[2] ,
21 bbGetInputIOP()[3] , bbGetInputIOP()[4] , bbGetInputIOP()[5] );
23 transform = creaimage->GetvtkTransform( );
24 resultImage = creaimage->GetImage() ;
26 bbSetOutputOut( transform );
27 bbSetOutputOutImage( resultImage );
31 void TransformSimple::bbUserConstructor()
33 creaimage = new CreaImage();
34 bbSetInputInImage(NULL);
37 void TransformSimple::bbUserCopyConstructor(bbtk::BlackBox::Pointer)
41 void TransformSimple::bbUserDestructor()
43 // transform->Delete();
50 // 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)
52 void TransformSimple::bbUserSetDefaultValues()
54 creaimage = new CreaImage();
55 bbSetInputInImage(NULL);
61 // 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)
63 void TransformSimple::bbUserInitializeProcessing()
66 // THE INITIALIZATION METHOD BODY :
68 // but this is where you should allocate the internal/output pointers
74 // 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)
76 void TransformSimple::bbUserFinalizeProcessing()
79 // THE FINALIZATION METHOD BODY :
81 // but this is where you should desallocate the internal/output pointers
88 // EO namespace bbTransform3Ddicom