bbGetVtkObject()->SetInput(bbGetInputIn4());
bbGetVtkObject()->SetInput(bbGetInputIn5());
#else
- bbGetVtkObject()->SetInputData(bbGetInputIn1());
- bbGetVtkObject()->SetInputData(bbGetInputIn2());
- bbGetVtkObject()->SetInputData(bbGetInputIn3());
- bbGetVtkObject()->SetInputData(bbGetInputIn4());
- bbGetVtkObject()->SetInputData(bbGetInputIn5());
+ bbGetVtkObject()->AddInputData(bbGetInputIn1());
+ bbGetVtkObject()->AddInputData(bbGetInputIn2());
+ bbGetVtkObject()->AddInputData(bbGetInputIn3());
+ bbGetVtkObject()->AddInputData(bbGetInputIn4());
+ bbGetVtkObject()->AddInputData(bbGetInputIn5());
#endif
int i,j,k;
int sizeX,sizeY,sizeZ;
- if (bbGetInputIn()!=NULL){
+ if (bbGetInputIn()!=NULL)
+ {
int ext[6];
//EED 2017-01-01 Migration VTK7
sizeX=ext[1]-ext[0]+1;
sizeY=ext[3]-ext[2]+1;
- sizeZ=ext[5]-ext[4]+1;
-
+ sizeZ=ext[5]-ext[4]+1;
sizeX=(sizeX/2)*2;
sizeY=(sizeY/2)*2;
-// if (_newImage==NULL)
-// {
- _newImage = vtkImageData::New();
- _newImage->Initialize();
- _newImage->SetSpacing( bbGetInputIn()->GetSpacing() );
- _newImage->SetDimensions( sizeX,sizeY,sizeZ );
+ _newImage = vtkImageData::New();
+ _newImage->Initialize();
+ _newImage->SetSpacing( bbGetInputIn()->GetSpacing() );
+ _newImage->SetDimensions( sizeX,sizeY,sizeZ );
//EED 2017-01-01 Migration VTK7
#if (VTK_MAJOR_VERSION <= 5)
- _newImage->SetWholeExtent(0,sizeX-1,0,sizeY-1,0,sizeZ-1);
- _newImage->SetNumberOfScalarComponents( bbGetInputIn()->GetNumberOfScalarComponents() );
- _newImage->SetScalarType( bbGetInputIn()->GetScalarType() );
- _newImage->AllocateScalars();
+ _newImage->SetWholeExtent(0,sizeX-1,0,sizeY-1,0,sizeZ-1);
+ _newImage->SetNumberOfScalarComponents( bbGetInputIn()->GetNumberOfScalarComponents() );
+ _newImage->SetScalarType( bbGetInputIn()->GetScalarType() );
+ _newImage->AllocateScalars();
#endif
#if (VTK_MAJOR_VERSION >= 6)
- _newImage->SetExtent(0,sizeX-1,0,sizeY-1,0,sizeZ-1);
- _newImage->AllocateScalars(bbGetInputIn()->GetScalarType(),1);
+ _newImage->SetExtent(0,sizeX-1,0,sizeY-1,0,sizeZ-1);
+ _newImage->AllocateScalars(bbGetInputIn()->GetScalarType(),1);
#endif
-
-
-// }
-
-
-
for (i=0; i<sizeX; i++)
{
for (j=0; j<sizeY; j++)
_newImage->SetScalarComponentFromDouble(i,j,k, 0, value );
} // for k
} // for j
- } // for i
-
- }// bbGetInputIn
-
+ } // for i
+ }// bbGetInputIn
bbSetOutputOut(_newImage);
-
}
//=====
// 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_BEGIN_DESCRIBE_BLACK_BOX(AutoCrop,bbtk::AtomicBlackBox);
BBTK_NAME("AutoCrop");
BBTK_AUTHOR("Info-Dev");
- BBTK_DESCRIPTION("Automatique cropping of the image");
+ BBTK_DESCRIPTION("Automatique cropping of the image, (See also ImageBoundaries)");
BBTK_CATEGORY("Filter");
BBTK_INPUT(AutoCrop,In,"Input image",vtkImageData*,"");
- BBTK_INPUT(AutoCrop,Type,"Type of cropping (default 0) 0=power of two dimensions",int,"");
+ BBTK_INPUT(AutoCrop,Type,"Type of cropping (default 0) 0=power of two dimensions X and Y",int,"");
BBTK_OUTPUT(AutoCrop,Out,"Output image",vtkImageData*,"");
BBTK_END_DESCRIBE_BLACK_BOX(AutoCrop);
//=====
<vtkobject>vtkConeSource</vtkobject>
<output name="Out" type="vtkPolyData*" special="vtk output" description="Output Cone"/>
-<input name="Radius" type="double" special="vtk parameter" description="Cone Radius"/>
-<input name="Resolution" type="int" special="vtk parameter" description="Cone Resolution"/>
-<input name="CenterX" type="double" description="Center X coord"/>
-<input name="CenterY" type="double" description="Center Y coord"/>
-<input name="CenterZ" type="double" description="Center Z coord"/>
-<input name="DirectionX" type="double" description="X Direction"/>
-<input name="DirectionY" type="double" description="Y Direction"/>
-<input name="DirectionZ" type="double" description="Z Direction"/>
+<input name="Radius" type="double" special="vtk parameter" description="Cone Radius (default 1)"/>
+<input name="Height" type="double" special="vtk parameter" description="Cone height (default 1)"/>
+<input name="Resolution" type="int" special="vtk parameter" description="Cone Resolution (default 10)"/>
+<input name="CenterX" type="double" description="Center X coord (default 0)"/>
+<input name="CenterY" type="double" description="Center Y coord (default 0)"/>
+<input name="CenterZ" type="double" description="Center Z coord (default 0)"/>
+<input name="DirectionX" type="double" description="X Direction (default 0)"/>
+<input name="DirectionY" type="double" description="Y Direction (default 0)"/>
+<input name="DirectionZ" type="double" description="Z Direction (default 1)"/>
<process>
<PRE>
bbGetVtkObject()->SetCenter(bbGetInputCenterX(),
bbGetInputCenterY(),
bbGetInputCenterZ());
-
bbGetVtkObject()->SetDirection(bbGetInputDirectionX(),
bbGetInputDirectionY(),
- bbGetInputDirectionZ());
-
+ bbGetInputDirectionZ());
bbGetVtkObject()->SetResolution(bbGetInputResolution());
bbGetVtkObject()->SetRadius((double)bbGetInputRadius());
+bbGetVtkObject()->SetHeight((double)bbGetInputHeight());
bbGetVtkObject()->Update();
</PRE>
</process>
+<defaultValues>
+<PRE>
+ bbSetInputRadius( 1 );
+ bbSetInputHeight( 1 );
+ bbSetInputResolution( 10 );
+ bbSetInputCenterX( 0 );
+ bbSetInputCenterY( 0 );
+ bbSetInputCenterZ( 0 );
+ bbSetInputDirectionX( 0 );
+ bbSetInputDirectionY( 0 );
+ bbSetInputDirectionZ( 1 );
+</PRE>
+</defaultValues>
+
+
+
</blackbox>