--- /dev/null
+#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
+
+
--- /dev/null
+#ifndef __bbcreaMaracasVisuSliceImage_h_INCLUDED__
+#define __bbcreaMaracasVisuSliceImage_h_INCLUDED__
+#include "bbcreaMaracasVisu_EXPORT.h"
+#include "bbtkAtomicBlackBox.h"
+#include "iostream"
+
+#include <vtkImageData.h>
+#include <vtkImageReslice.h>
+
+namespace bbcreaMaracasVisu
+{
+
+class bbcreaMaracasVisu_EXPORT SliceImage
+ :
+ public bbtk::AtomicBlackBox
+{
+ BBTK_BLACK_BOX_INTERFACE(SliceImage,bbtk::AtomicBlackBox);
+//==================================================================
+/// User callback called in the box contructor
+virtual void bbUserConstructor();
+/// User callback called in the box copy constructor
+virtual void bbUserCopyConstructor(bbtk::BlackBox::Pointer);
+/// User callback called in the box destructor
+virtual void bbUserDestructor();
+//==================================================================
+ BBTK_DECLARE_INPUT(In,vtkImageData*);
+ BBTK_DECLARE_INPUT(Z, double );
+ BBTK_DECLARE_OUTPUT(Out,vtkImageData*);
+ BBTK_PROCESS(Process);
+ void Process();
+
+ vtkImageReslice *imageReslice;
+
+};
+
+BBTK_BEGIN_DESCRIBE_BLACK_BOX(SliceImage,bbtk::AtomicBlackBox);
+BBTK_NAME("SliceImage");
+BBTK_AUTHOR("eduardo.davila@creatis.insa-lyon.fr");
+BBTK_DESCRIPTION("filter");
+BBTK_CATEGORY("");
+BBTK_INPUT(SliceImage,In,"Input image",vtkImageData *,"");
+BBTK_INPUT(SliceImage,Z,"Z",double,"");
+BBTK_OUTPUT(SliceImage,Out,"Output image",vtkImageData *,"");
+BBTK_END_DESCRIBE_BLACK_BOX(SliceImage);
+}
+// EO namespace bbcreaMaracasVisu
+
+#endif // __bbcreaMaracasVisuSliceImage_h_INCLUDED__
+