#include "bbcreaMaracasVisuSliceImage.h" #include "bbcreaMaracasVisuPackage.h" namespace bbcreaMaracasVisu { BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaMaracasVisu,SliceImage) BBTK_BLACK_BOX_IMPLEMENTATION(SliceImage,bbtk::AtomicBlackBox); void SliceImage::Process() { //printf("EED 0 SliceImage::Process \n"); vtkImageData *imagedata=NULL; //std::cout<<"MSJ: test SliceImage::Process()"<SetInput( bbGetInputIn() ); imageReslice->SetInformationInput(bbGetInputIn() ); imageReslice->SetResliceAxesDirectionCosines(1,0,0, 0,1,0 ,0,0,1); imageReslice->SetResliceAxesOrigin(0,0, bbGetInputZ()*bbGetInputIn()->GetSpacing()[2] ); imageReslice->SetOutputDimensionality(2); imageReslice->SetInterpolationModeToLinear(); imagedata = imageReslice->GetOutput(); imagedata->Update(); imagedata->UpdateInformation(); //printf("EED 1 SliceImage::Process %p\n", imagedata); } bbSetOutputOut( imagedata ); } //----------------------------------------------------------------- void SliceImage::bbUserSetDefaultValues() { bbSetInputIn(NULL); bbSetInputZ(0); imageReslice=NULL; } //----------------------------------------------------------------- void SliceImage::bbUserInitializeProcessing() { imageReslice = vtkImageReslice::New(); } //----------------------------------------------------------------- void SliceImage::bbUserFinalizeProcessing() { } //----------------------------------------------------------------- } // EO namespace bbcreaMaracasVisu