#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() { vtkImageData *imagedata=NULL; if ( bbGetInputIn()!=NULL ){ imageReslice->SetInput( imagedata ); imageReslice->SetInformationInput(imagedata); imageReslice->SetResliceAxesDirectionCosines(1,0,0, 0,1,0 ,0,0,1); imageReslice->SetResliceAxesOrigin(0,0, bbGetInputZ() ); imageReslice->SetOutputDimensionality(2); imageReslice->SetInterpolationModeToLinear(); vtkImageData *imagedata = imageReslice->GetOutput(); imagedata->Update(); imagedata->UpdateInformation(); } bbSetOutputOut( imagedata ); } void SliceImage::bbUserConstructor() { bbSetInputIn(NULL); bbSetInputZ(0); imageReslice = vtkImageReslice::New(); } void SliceImage::bbUserCopyConstructor(bbtk::BlackBox::Pointer) { } void SliceImage::bbUserDestructor() { } } // EO namespace bbcreaMaracasVisu