{
for (j=0 ; j<dim[1] ; j++)
{
- image->SetScalarComponentFromDouble (ext[0]+i, ext[2]+j, ext[4]+0 , 0, 0.0);
- image->SetScalarComponentFromDouble (ext[0]+i, ext[2]+j, ext[4]+dim[2]-1, 0, 0.0);
+ image->SetScalarComponentFromDouble (ext[0]+i, ext[2]+j, ext[4]+0 , 0, bbGetInputGrayLevel() );
+ image->SetScalarComponentFromDouble (ext[0]+i, ext[2]+j, ext[4]+dim[2]-1, 0, bbGetInputGrayLevel() );
} // for j
}// for i
{
for (j=0 ; j<dim[2] ; j++)
{
- image->SetScalarComponentFromDouble (ext[0]+0 , ext[2]+i, ext[4]+j, 0, 0.0);
- image->SetScalarComponentFromDouble (ext[0]+dim[0]-1 , ext[2]+i, ext[4]+j, 0, 0.0);
+ image->SetScalarComponentFromDouble (ext[0]+0 , ext[2]+i, ext[4]+j, 0, bbGetInputGrayLevel() );
+ image->SetScalarComponentFromDouble (ext[0]+dim[0]-1 , ext[2]+i, ext[4]+j, 0, bbGetInputGrayLevel() );
} // for j
} // for i
{
for (j=0 ; j<dim[2] ; j++)
{
- image->SetScalarComponentFromDouble (ext[0]+i, ext[2]+0 , ext[4]+j, 0, 0.0);
- image->SetScalarComponentFromDouble (ext[0]+i, ext[2]+dim[1]-1 , ext[4]+j, 0, 0.0);
+ image->SetScalarComponentFromDouble (ext[0]+i, ext[2]+0 , ext[4]+j, 0, bbGetInputGrayLevel() );
+ image->SetScalarComponentFromDouble (ext[0]+i, ext[2]+dim[1]-1 , ext[4]+j, 0, bbGetInputGrayLevel() );
} // for j
}// for i
} // if In
CleanTypeA(imageoutput);
bbSetOutputOut( imageoutput );
}
-
-
-
-
}
-//=====
+
+//=====
// 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)
//=====
void CleanExternalPlane::bbUserSetDefaultValues()
{
-
// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
// Here we initialize the input 'In' to 0
bbSetInputIn(NULL);
bbSetInputType(0);
-
+ bbSetInputGrayLevel(0.0);
}
-//=====
+
+//=====
// 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)
//=====
void CleanExternalPlane::bbUserInitializeProcessing()
{
-
// THE INITIALIZATION METHOD BODY :
// Here does nothing
// but this is where you should allocate the internal/output pointers
-// if any
-
+// if any
imageoutput = vtkImageData::New();
-
}
-//=====
+
+//=====
// 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)
//=====
void CleanExternalPlane::bbUserFinalizeProcessing()
{
-
// THE FINALIZATION METHOD BODY :
// Here does nothing
// but this is where you should desallocate the internal/output pointers
//=====
BBTK_DECLARE_INPUT(In,vtkImageData*);
BBTK_DECLARE_INPUT(Type,int);
+ BBTK_DECLARE_INPUT(GrayLevel,double);
BBTK_DECLARE_OUTPUT(Out,vtkImageData*);
BBTK_PROCESS(Process);
BBTK_CATEGORY("filter");
BBTK_INPUT(CleanExternalPlane,In,"Input image",vtkImageData*,"");
BBTK_INPUT(CleanExternalPlane,Type,"-1= nothing to do, 0 = (default) not modifie Dimention. 1 = Add outside plane (Dimension of image change)",int,"");
+ BBTK_INPUT(CleanExternalPlane,GrayLevel,"Gray level to fill clean plane",double,"");
BBTK_OUTPUT(CleanExternalPlane,Out,"Output image",vtkImageData*,"");
BBTK_END_DESCRIBE_BLACK_BOX(CleanExternalPlane);
//=====