#include "bbTransform3DdicomTransformSimple.h" #include "bbTransform3DdicomPackage.h" namespace bbTransform3Ddicom { BBTK_ADD_BLACK_BOX_TO_PACKAGE(Transform3Ddicom,TransformSimple) BBTK_BLACK_BOX_IMPLEMENTATION(TransformSimple,bbtk::AtomicBlackBox); void TransformSimple::Process() { vtkImageData *resultImage = NULL; vtkTransform *transform = NULL; if ( bbGetInputInImage()!=NULL ) { creaimage->SetvtkImageData( bbGetInputInImage() ); creaimage->SetImagePositionPatient( bbGetInputIPP()[0] , bbGetInputIPP()[1] , bbGetInputIPP()[2] ); creaimage->SetImageSpacing( bbGetInputPixelSpacing()[0] , bbGetInputPixelSpacing()[1] , bbGetInputPixelSpacing()[2] ); creaimage->SetImageOrientation( bbGetInputIOP()[0] , bbGetInputIOP()[1] , bbGetInputIOP()[2] , bbGetInputIOP()[3] , bbGetInputIOP()[4] , bbGetInputIOP()[5] ); creaimage->Update(); transform = creaimage->GetvtkTransform( ); resultImage = creaimage->GetImage() ; } bbSetOutputOut( transform ); bbSetOutputOutImage( resultImage ); } /* void TransformSimple::bbUserConstructor() { creaimage = new CreaImage(); bbSetInputInImage(NULL); } void TransformSimple::bbUserCopyConstructor(bbtk::BlackBox::Pointer) { } void TransformSimple::bbUserDestructor() { // transform->Delete(); } */ //===== // 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) //===== void TransformSimple::bbUserSetDefaultValues() { creaimage = new CreaImage(); bbSetInputInImage(NULL); } //===== // 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) //===== void TransformSimple::bbUserInitializeProcessing() { // THE INITIALIZATION METHOD BODY : // Here does nothing // but this is where you should allocate the internal/output pointers // if any } //===== // 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) //===== void TransformSimple::bbUserFinalizeProcessing() { // THE FINALIZATION METHOD BODY : // Here does nothing // but this is where you should desallocate the internal/output pointers // if any } } // EO namespace bbTransform3Ddicom