From e4f703b75f7cbb14b94688c02a3b7f8c2ab1471a Mon Sep 17 00:00:00 2001 From: "eduardo.davila@creatis.insa-lyon.fr" Date: Thu, 13 Jun 2024 08:34:14 +0200 Subject: [PATCH] #3526 Active option in HausdorffDistancePointSetFilter box --- ...creaVtkHausdorffDistancePointSetFilter.cxx | 33 ++++++++++--------- ...bbcreaVtkHausdorffDistancePointSetFilter.h | 2 ++ 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/bbtk_creaVtk_PKG/src/bbcreaVtkHausdorffDistancePointSetFilter.cxx b/bbtk_creaVtk_PKG/src/bbcreaVtkHausdorffDistancePointSetFilter.cxx index 16b8bfd..58fd52f 100644 --- a/bbtk_creaVtk_PKG/src/bbcreaVtkHausdorffDistancePointSetFilter.cxx +++ b/bbtk_creaVtk_PKG/src/bbcreaVtkHausdorffDistancePointSetFilter.cxx @@ -32,7 +32,7 @@ void HausdorffDistancePointSetFilter::Process() // bbSetOutputOut( bbGetInputIn() ); // std::cout << "Output value = " <SetInputData(0, bbGetInputInA() ); @@ -50,9 +50,13 @@ void HausdorffDistancePointSetFilter::Process() bbSetOutputHausdorffDistance( hd ); bbSetOutputOutA( (vtkPolyData*) (hausdorff->GetOutput(0)) ); bbSetOutputOutB( (vtkPolyData*) (hausdorff->GetOutput(1)) ); - } // if + } else { + bbSetOutputOutA( bbGetInputInA() ); + bbSetOutputOutB( bbGetInputInB() ); + }// if Type InA InB } -//===== + +//===== // 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 HausdorffDistancePointSetFilter::bbUserSetDefaultValues() @@ -60,36 +64,33 @@ void HausdorffDistancePointSetFilter::bbUserSetDefaultValues() // SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX // Here we initialize the input 'In' to 0 - bbSetInputInA(NULL); - bbSetInputInB(NULL); - + bbSetInputActive(true); + bbSetInputInA(NULL); + bbSetInputInB(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) //===== void HausdorffDistancePointSetFilter::bbUserInitializeProcessing() { - // THE INITIALIZATION METHOD BODY : // Here does nothing // but this is where you should allocate the internal/output pointers -// if any - - +// if any } -//===== + +//===== // 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 HausdorffDistancePointSetFilter::bbUserFinalizeProcessing() { - // THE FINALIZATION METHOD BODY : // Here does nothing // but this is where you should desallocate the internal/output pointers // if any - -} } -// EO namespace bbcreaVtk + +}// EO namespace bbcreaVtk diff --git a/bbtk_creaVtk_PKG/src/bbcreaVtkHausdorffDistancePointSetFilter.h b/bbtk_creaVtk_PKG/src/bbcreaVtkHausdorffDistancePointSetFilter.h index 434c36a..2eea86f 100644 --- a/bbtk_creaVtk_PKG/src/bbcreaVtkHausdorffDistancePointSetFilter.h +++ b/bbtk_creaVtk_PKG/src/bbcreaVtkHausdorffDistancePointSetFilter.h @@ -21,6 +21,7 @@ class bbcreaVtk_EXPORT HausdorffDistancePointSetFilter //===== // 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(Active,bool); BBTK_DECLARE_INPUT(InA,vtkPolyData*); BBTK_DECLARE_INPUT(InB,vtkPolyData*); @@ -43,6 +44,7 @@ BBTK_BEGIN_DESCRIBE_BLACK_BOX(HausdorffDistancePointSetFilter,bbtk::AtomicBlackB BBTK_DESCRIPTION("(C++,Python) Output Mesh with HausdorffDistance and RelativeDistance vector information "); BBTK_CATEGORY("empty"); + BBTK_INPUT(HausdorffDistancePointSetFilter,Active,"(default true) True/False",bool,""); BBTK_INPUT(HausdorffDistancePointSetFilter,InA,"Mesh A",vtkPolyData*,""); BBTK_INPUT(HausdorffDistancePointSetFilter,InB,"Mesh B",vtkPolyData*,""); -- 2.45.1