if ((bbGetInputImage()!=NULL) && (bbGetInputMask()!=NULL))
{
- int extImage[6];
- int extMask[6];
- vtkImageData *resultImage=NULL;
+ int extImage[6];
+ int extMask[6];
+ vtkImageData *resultImage=NULL;
bbGetInputImage()->GetExtent( extImage );
bbGetInputImage()->GetExtent( extMask );
- int dimXImage = extImage[1]-extImage[0]+1;
- int dimYImage = extImage[3]-extImage[2]+1;
- int dimZImage = extImage[5]-extImage[4]+1;
- int dimXMask = extMask[1]-extMask[0]+1;
- int dimYMask = extMask[3]-extMask[2]+1;
- int dimZMask = extMask[5]-extMask[4]+1;
+ int dimXImage = extImage[1]-extImage[0]+1;
+ int dimYImage = extImage[3]-extImage[2]+1;
+ int dimZImage = extImage[5]-extImage[4]+1;
+ int dimXMask = extMask[1]-extMask[0]+1;
+ int dimYMask = extMask[3]-extMask[2]+1;
+ int dimZMask = extMask[5]-extMask[4]+1;
+
+ double background = bbGetInputBackground();
+ double bgToAnalice = bbGetInputBackgroundToAnalice();
if (bbGetInputType()==0)
{
if (bbGetInputType()==0) //Applay mask to new Image
{
GETVALUE2_VTK_CREA(vI,pI,stI,i);
- if (vM!=0)
+ if (vM!=bgToAnalice)
{
vO = vI;
} else {
- vO = bbGetInputBackground();
- }
+ vO = background;
+ } // if vM
SETVALUE2_VTK_CREA(vO,pO,stO,i);
} // if Type==0
if (bbGetInputType()==1) //Modifiy the Input image with the Label value in Mask place
{
- if (vM!=0)
+ if (vM!=bgToAnalice)
{
vO = bbGetInputLabel();
SETVALUE2_VTK_CREA(vO,pO,stO,i);
}
- } // if Type==0
+ } // if Type==1
if (bbGetInputType()==2) //Modifiy the Input image with the Mask value
{
- if (vM!=0)
+ if (vM!=bgToAnalice)
{
vO = vM;
SETVALUE2_VTK_CREA(vO,pO,stO,i);
}
- } // if Type==0
+ } // if Type==2
} // for
} //if dim
- bbSetOutputOut( resultImage );
+ bbSetOutputOut( resultImage );
} // if Image && Mask
-
}
//=====
// 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)
// Here we initialize the input 'In' to 0
bbSetInputImage(NULL);
bbSetInputMask(NULL);
- bbSetInputBackground(0);
+ bbSetInputBackground(0); // output image Type 0
+ bbSetInputBackgroundToAnalice(0);
bbSetInputLabel(255);
bbSetInputType(0);
bbSetOutputOut(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)
//=====
BBTK_DECLARE_INPUT(Background,double);
+ BBTK_DECLARE_INPUT(BackgroundToAnalice,double);
BBTK_DECLARE_INPUT(Label,double);
BBTK_DECLARE_INPUT(Image,vtkImageData*);
BBTK_DECLARE_INPUT(Mask,vtkImageData*);
BBTK_AUTHOR("InfoDev");
BBTK_DESCRIPTION("No Description.");
BBTK_CATEGORY("empty");
- BBTK_INPUT(ApplyMask,Background,"Background value",double,"");
- BBTK_INPUT(ApplyMask,Label,"(double 255) Label value (type 1,2)",double,"");
+ BBTK_INPUT(ApplyMask,Background,"(default 0) type 0: Background value in output image type 1: Nothing type 2: Nothing",double,"");
+ BBTK_INPUT(ApplyMask,BackgroundToAnalice,"(default 0) Background to check in the mask ",double,"");
+ BBTK_INPUT(ApplyMask,Label,"(double 255) type 0: Nothing type 1: valueOut in the mask type 2: Nothing ",double,"");
BBTK_INPUT(ApplyMask,Image,"Input image",vtkImageData*,"");
BBTK_INPUT(ApplyMask,Mask,"Input mask",vtkImageData*,"");
BBTK_INPUT(ApplyMask,Type,"(default 0) 0:Create new image 1:Modify the Image input with Label value at the mask place 2: Modify the Image input with the value of the mask",int,"");