From 8667946fcfa734175e68b00c1bbf678868180908 Mon Sep 17 00:00:00 2001 From: Eduardo DAVILA Date: Thu, 31 Aug 2017 17:21:45 +0200 Subject: [PATCH] #3121 BBTK Bug New Normal - branch changestoITK3and4 --- .../src/bbitkBinaryThresholdImageFilter.cxx | 9 +++---- .../itk/src/bbitkBinaryThresholdImageFilter.h | 7 +----- .../src/bbitkvtkitkImage2vtkImageData.cxx | 25 +++++++++++-------- .../src/bbitkvtkvtkImageData2itkImage.cxx | 2 ++ .../itkvtk/src/itkImageToVTKImageFilter.txx | 4 --- 5 files changed, 22 insertions(+), 25 deletions(-) diff --git a/packages/itk/src/bbitkBinaryThresholdImageFilter.cxx b/packages/itk/src/bbitkBinaryThresholdImageFilter.cxx index 97160e0..6e620ac 100644 --- a/packages/itk/src/bbitkBinaryThresholdImageFilter.cxx +++ b/packages/itk/src/bbitkBinaryThresholdImageFilter.cxx @@ -69,8 +69,7 @@ namespace bbitk bbtk::AtomicBlackBox); BBTK_ADD_BLACK_BOX_TO_PACKAGE(itk, BinaryThresholdImageFilterGeneric); - - + void BinaryThresholdImageFilterGeneric::bbUserSetDefaultValues() { bbSetInputLowerThreshold(0); @@ -78,16 +77,16 @@ namespace bbitk bbSetInputInsideValue(255); bbSetInputOutsideValue(0); } + void BinaryThresholdImageFilterGeneric::bbUserInitializeProcessing() { } + void BinaryThresholdImageFilterGeneric::bbUserFinalizeProcessing() { } -} - -// EO namespace bbtk +} // EO namespace bbitk #endif //_USE_ITK_ diff --git a/packages/itk/src/bbitkBinaryThresholdImageFilter.h b/packages/itk/src/bbitkBinaryThresholdImageFilter.h index ed7167b..bda1917 100644 --- a/packages/itk/src/bbitkBinaryThresholdImageFilter.h +++ b/packages/itk/src/bbitkBinaryThresholdImageFilter.h @@ -209,11 +209,7 @@ namespace bbitk <()<<">()"< FilterType; - typename FilterType::Pointer f - - = FilterType::New("Temp"); - -/* + typename FilterType::Pointer f = FilterType::New("Temp"); typedef T* TPointer; f->bbSetInputIn( this->bbGetInputIn().get < TPointer > () ); f->bbSetInputLowerThreshold ( (typename T::PixelType)this->bbGetInputLowerThreshold() ); @@ -223,7 +219,6 @@ namespace bbitk f->bbExecute(); f->bbGetOutputOut()->Register(); this->bbSetOutputOut( f->bbGetOutputOut() ); -*/ bbtkDebugDecTab("Core",9); } diff --git a/packages/itkvtk/src/bbitkvtkitkImage2vtkImageData.cxx b/packages/itkvtk/src/bbitkvtkitkImage2vtkImageData.cxx index 77240ac..13dae05 100644 --- a/packages/itkvtk/src/bbitkvtkitkImage2vtkImageData.cxx +++ b/packages/itkvtk/src/bbitkvtkitkImage2vtkImageData.cxx @@ -45,10 +45,19 @@ #include "bbitkvtkPackage.h" #include "itkImageToVTKImageFilter.h" + + +/* +#EED 2017-08-29 itk3toitk4 +#define BBITKVTK_itkImage2vtkImageData_Template( t, ty, di ) \ + if( t == typeid( itk::Image< ty, di > ) ) \ + this->Convert< itk::Image< ty, di > >( ) +*/ + // ------------------------------------------------------------------------- // LFV: avoid itk::Concept check on 4d or superior images #define BBITKVTK_itkImage2vtkImageData_Template( t, ty, di ) \ - if( t == typeid( itk::Image< ty, di > ) ) \ + if( t == typeid( itk::Image< ty, di >* ) ) \ this->Convert< itk::Image< ty, di > >( ) // ------------------------------------------------------------------------- @@ -93,7 +102,7 @@ namespace bbitkvtk else BBITKVTK_itkImage2vtkImageData_Template( t, unsigned short, 3 ); else BBITKVTK_itkImage2vtkImageData_Template( t, unsigned int, 3 ); else BBITKVTK_itkImage2vtkImageData_Template( t, unsigned long, 3 ); - + /* Deprecated BBTK_TEMPLATE_ITK_IMAGE_SWITCH(t,Convert); */ @@ -118,9 +127,7 @@ namespace bbitkvtk conv = ItkToVtkConnection::New(); mConverter = conv; conv->SetInput( this->bbGetInputIn().get< itkImageTypePointer >() ); - } - else - { + } else { bbtkDebugMessage("process",5," ["<SetInput( this->bbGetInputIn().get() ); } - else - { + else { bbtkDebugMessage("process",5," ["<() <<">() *DONE*"<Update(); + itkImageType* out = const_cast(conv->GetOutput()); bbSetOutputOut(out); } diff --git a/packages/itkvtk/src/itkImageToVTKImageFilter.txx b/packages/itkvtk/src/itkImageToVTKImageFilter.txx index 85dc0dc..034a168 100644 --- a/packages/itkvtk/src/itkImageToVTKImageFilter.txx +++ b/packages/itkvtk/src/itkImageToVTKImageFilter.txx @@ -43,8 +43,6 @@ namespace itk { - - /** * Constructor */ @@ -73,8 +71,6 @@ ImageToVTKImageFilter } - - /** * Destructor */ -- 2.47.1