From: Eduardo DAVILA Date: Mon, 24 Jun 2013 12:42:04 +0000 (+0200) Subject: 2024 Feature ( FLIP X Y Z ) and the original option or no flip X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=837799a3ef8cb0a5f51815e47ecbcb67d849e09b;p=bbtk.git 2024 Feature ( FLIP X Y Z ) and the original option or no flip --- diff --git a/packages/vtk/src/bbvtkFlip.cxx b/packages/vtk/src/bbvtkFlip.cxx index d37aa6f..a252888 100644 --- a/packages/vtk/src/bbvtkFlip.cxx +++ b/packages/vtk/src/bbvtkFlip.cxx @@ -114,6 +114,7 @@ void Flip::Process() int scalarSize = bbGetInputIn()->GetScalarSize(); int lineSize = inputdims[0]*scalarSize*nbScalComp; int planeSize = inputdims[1]*lineSize; + int volumeSize = inputdims[2]*planeSize; char *pixelsIn = (char *)bbGetInputIn()->GetScalarPointer(); char *pixelsOut = (char *)mImageOut->GetScalarPointer(); @@ -123,7 +124,12 @@ void Flip::Process() char *debPlanOut; int i,j,k; - if ( (bbGetInputAxis()=="X") || (bbGetInputAxis()=="x") ) + if ( (bbGetInputAxis()=="O") || (bbGetInputAxis()=="o") ) + { + pixelsIn = (char *)bbGetInputIn()->GetScalarPointer(0,0,0); + pixelsOut = (char *)mImageOut->GetScalarPointer(0,0,0); + memcpy(pixelsOut, pixelsIn, volumeSize ); + } else if ( (bbGetInputAxis()=="X") || (bbGetInputAxis()=="x") ) { for(k=0; k"); BBTK_CATEGORY("application, image"); BBTK_INPUT(Flip, In, "image", vtkImageData *, ""); - BBTK_INPUT(Flip, Axis, "Axe (default Y) X Y Z", std::string, ""); + BBTK_INPUT(Flip, Axis, "Axe (default Y) X Y Z O(original)", std::string, ""); BBTK_OUTPUT(Flip, Out, "fliped image", vtkImageData *, ""); BBTK_END_DESCRIBE_BLACK_BOX(Flip); //=================================================================