]> Creatis software - cpPlugins.git/blobdiff - plugins/ImageThresholdFilters/ImageToBoundingBoxFromThreshold.cxx
...
[cpPlugins.git] / plugins / ImageThresholdFilters / ImageToBoundingBoxFromThreshold.cxx
index 6e2f15ff30432c1552b057fb6be860c080d6a0f3..52082a2b1b1b9952912c6efc41a57571107ee6db 100644 (file)
@@ -1,17 +1,19 @@
-#include <plugins/ImageThresholdFilters/ImageToBoundingBoxFromThreshold.h>
+#include <ImageThresholdFilters/ImageToBoundingBoxFromThreshold.h>
 #include <cpPlugins/DataObjects/Image.h>
 #include <cpPlugins/DataObjects/BoundingBox.h>
 
 #include <cpExtensions/Algorithms/ImageToBoundingBoxFromThreshold.h>
-#include <cpExtensions/Algorithms/ImageToBoundingBoxFromThreshold.hxx>
 
 // -------------------------------------------------------------------------
 cpPluginsImageThresholdFilters::ImageToBoundingBoxFromThreshold::
 ImageToBoundingBoxFromThreshold( )
   : Superclass( )
 {
-  this->_ConfigureInput< cpPlugins::DataObjects::Image >( "Input", true, false );
-  this->_ConfigureOutput< cpPlugins::DataObjects::BoundingBox >( "Output" );
+  typedef cpPlugins::DataObjects::Image _TImage;
+  typedef cpPlugins::DataObjects::BoundingBox _TBBox;
+
+  this->_ConfigureInput< _TImage >( "Input", true, false );
+  this->_ConfigureOutput< _TBBox >( "Output" );
 
   this->m_Parameters.ConfigureAsReal( "LowerThreshold" );
   this->m_Parameters.ConfigureAsReal( "UpperThreshold" );
@@ -30,9 +32,11 @@ cpPluginsImageThresholdFilters::ImageToBoundingBoxFromThreshold::
 void cpPluginsImageThresholdFilters::ImageToBoundingBoxFromThreshold::
 _GenerateData( )
 {
-  auto o = this->GetInputData( "Input" );
-  cpPlugins_Demangle_ImageScalars_Dims( o, _GD0 );
-  else this->_Error( "Invalid input image." );
+  /* TODO
+     auto o = this->GetInputData( "Input" );
+     cpPlugins_Demangle_ImageScalars_Dims( o, _GD0 );
+     else this->_Error( "Invalid input image." );
+  */
 }
 
 // -------------------------------------------------------------------------
@@ -40,25 +44,27 @@ template< class _TImage >
 void cpPluginsImageThresholdFilters::ImageToBoundingBoxFromThreshold::
 _GD0( _TImage* image )
 {
-  typedef
-    cpExtensions::Algorithms::ImageToBoundingBoxFromThreshold< _TImage >
-    _TFilter;
+  /* TODO
+     typedef
+     cpExtensions::Algorithms::ImageToBoundingBoxFromThreshold< _TImage >
+     _TFilter;
 
-  // Configure filter
-  _TFilter* filter = this->_CreateITK< _TFilter >( );
-  filter->SetImage( image );
-  filter->SetLowerThreshold( this->m_Parameters.GetReal( "LowerThreshold" ) );
-  filter->SetUpperThreshold( this->m_Parameters.GetReal( "UpperThreshold" ) );
-  filter->Compute( );
+     // Configure filter
+     _TFilter* filter = this->_CreateITK< _TFilter >( );
+     filter->SetImage( image );
+     filter->SetLowerThreshold( this->m_Parameters.GetReal( "LowerThreshold" ) );
+     filter->SetUpperThreshold( this->m_Parameters.GetReal( "UpperThreshold" ) );
+     filter->Compute( );
 
-  // Create output
-  auto reg = filter->GetRegion( );
-  auto bb = this->GetOutput< cpPlugins::DataObjects::BoundingBox >( "Output" );
-  typename _TImage::PointType p0, p1;
-  image->TransformIndexToPhysicalPoint( reg.GetIndex( ), p0 );
-  image->TransformIndexToPhysicalPoint( reg.GetIndex( ) + reg.GetSize( ), p1 );
-  bb->SetMinimum( p0 );
-  bb->SetMaximum( p1 );
+     // Create output
+     auto reg = filter->GetRegion( );
+     auto bb = this->GetOutput< cpPlugins::DataObjects::BoundingBox >( "Output" );
+     typename _TImage::PointType p0, p1;
+     image->TransformIndexToPhysicalPoint( reg.GetIndex( ), p0 );
+     image->TransformIndexToPhysicalPoint( reg.GetIndex( ) + reg.GetSize( ), p1 );
+     bb->SetMinimum( p0 );
+     bb->SetMaximum( p1 );
+  */
 }
 
 // eof - $RCSfile$