]> Creatis software - bbtk.git/commitdiff
#3121 BBTK Bug New Normal - branch changestoITK3and4 changestoITK3and4
authorEduardo DAVILA <davila@localhost.localdomain>
Thu, 31 Aug 2017 15:21:45 +0000 (17:21 +0200)
committerEduardo DAVILA <davila@localhost.localdomain>
Thu, 31 Aug 2017 15:21:45 +0000 (17:21 +0200)
packages/itk/src/bbitkBinaryThresholdImageFilter.cxx
packages/itk/src/bbitkBinaryThresholdImageFilter.h
packages/itkvtk/src/bbitkvtkitkImage2vtkImageData.cxx
packages/itkvtk/src/bbitkvtkvtkImageData2itkImage.cxx
packages/itkvtk/src/itkImageToVTKImageFilter.txx

index 97160e064eee523f93aba1b40d0839041b1d333f..6e620ac3d8745ee56227758723c67e1669676034 100644 (file)
@@ -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_
 
index ed7167bcb021322876ad745579d8f817b175e0df..bda1917b7d38b87db1aef7eea08384569258c25b 100644 (file)
@@ -209,11 +209,7 @@ namespace bbitk
                        <<bbtk::TypeName<T>()<<">()"<<std::endl);
  
     typedef BinaryThresholdImageFilter<T> 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);
   }
index 77240acb1fd5dd9dd3406472827166c7fb2f1adc..13dae0557d8a2266dee56d6681bdf7ef2f828406 100644 (file)
 #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,"    ["<<bbGetFullName()<<"] : Converter ok "<<std::endl);
 
        // Input itkImageType type changed ? 
@@ -145,13 +152,10 @@ namespace bbitkvtk
 
            conv->SetInput( this->bbGetInputIn().get<itkImageTypePointer>() );
          }
-       else 
-         {
+       else {
            bbtkDebugMessage("process",5,"    ["<<bbGetFullName()<<"] : Nothing changed"<<std::endl);
          }
-      }
-    try
-      {
+      } try {
        
        bbtkDebugMessage("process",5,"    ["<<bbGetFullName()<<"] : Trying update"<<std::endl);  
 
@@ -167,6 +171,7 @@ namespace bbitkvtk
     bbtkDebugMessage("process",5,"<== ["<<bbGetFullName()<<"] : Convert<"
                     <<bbtk::TypeName<T>()
                     <<">() *DONE*"<<std::endl);
+
  }
 
   void itkImage2vtkImageData::bbUserSetDefaultValues()
index c1bf73479ebe65c21a13aa7ed165d097dc17880a..565e0274a2f04b56d08ebb8d36f2ab2b3ee9e3ce 100644 (file)
@@ -134,7 +134,9 @@ namespace bbitkvtk
       {
        
        bbtkDebugMessage("process",5,"    ["<<bbGetFullName()<<"] : Trying update"<<std::endl);  
+
        conv->Update();
+
        itkImageType* out = const_cast<itkImageType*>(conv->GetOutput());
        bbSetOutputOut(out);
       }
index 85dc0dcc8764577a1711d1947c9d9fed7f727780..034a16833be4b1a861a278ec26ddf628e3266226 100644 (file)
@@ -43,8 +43,6 @@
 namespace itk
 {
 
-
-
 /**
  * Constructor
  */
@@ -73,8 +71,6 @@ ImageToVTKImageFilter<TInputImage>
 }
 
 
-
-
 /**
  * Destructor
  */