BBTK_BEGIN_DESCRIBE_BLACK_BOX(BoxWidget,bbtk::AtomicBlackBox);
BBTK_NAME("BoxWidget");
BBTK_AUTHOR("InfoDev");
- BBTK_DESCRIPTION("(C++,Python) No Description.");
+ BBTK_DESCRIPTION("(C++,Python,JavaScript) No Description.");
BBTK_CATEGORY("empty");
BBTK_INPUT(BoxWidget,Active,"(default false) true/false",bool,"");
// vtkImageData
if ( (sizeLstFileNames==1) && (bbGetInputImage()!=NULL) )
{
- vtkJSONDataSetWriter *writer = vtkJSONDataSetWriter::New();
- writer->GetArchiver()->SetArchiveName( bbGetInputLstFileNames()[0].c_str() );
- writer->SetInputData( bbGetInputImage() );
- writer->Update();
+ image = bbGetInputImage();
+ filename = bbGetInputLstFileNames()[0];
+ if (image!=NULL)
+ {
+ vtkJSONDataSetWriter *writer = vtkJSONDataSetWriter::New();
+ writer->GetArchiver()->SetArchiveName( filename.c_str() );
+ writer->SetInputData( image );
+ writer->Update();
+ } // if image
} // if Image
// lst vtkImageData
// vtkPolyData
if ( (sizeLstFileNames==1) && (bbGetInputPolyData()!=NULL) )
{
+ polydata = bbGetInputPolyData();
+ filename = bbGetInputLstFileNames()[0];
+ printf("EED JSONDataSetWriter::Process filename=%s\n", filename.c_str() );
vtkJSONDataSetWriter *writer = vtkJSONDataSetWriter::New();
- writer->GetArchiver()->SetArchiveName( bbGetInputLstFileNames()[0].c_str() );
- writer->SetInputData( bbGetInputPolyData() );
- writer->Update();
+ if (polydata!=NULL)
+ {
+ writer->GetArchiver()->SetArchiveName( filename.c_str() );
+ writer->SetInputData( bbGetInputPolyData() );
+ writer->Update();
+ } // if polydata
} // if PolyData