]> Creatis software - cpPlugins.git/commitdiff
Raster filter updated. LUT image visualization strange bug :-(
authorLeonardo Flórez-Valencia <florez-l@javeriana.edu.co>
Fri, 16 Sep 2016 02:12:03 +0000 (21:12 -0500)
committerLeonardo Flórez-Valencia <florez-l@javeriana.edu.co>
Fri, 16 Sep 2016 02:12:03 +0000 (21:12 -0500)
17 files changed:
appli/examples/plugins/ImageTracer.cxx
lib/cpExtensions/Algorithms/RasterContourFilter.h [new file with mode: 0644]
lib/cpExtensions/Algorithms/RasterContourFilter.hxx [new file with mode: 0644]
lib/cpExtensions/Interaction/ImageSliceStyle.cxx
lib/cpExtensions/Interaction/ImageSliceStyle.h
lib/cpExtensions/Interaction/SeedWidget.cxx
lib/cpExtensions/QT/ImageWidget.cxx
lib/cpExtensions/QT/ImageWidget.h
lib/cpExtensions/QT/MPR3DWidget.cxx
lib/cpExtensions/QT/MPR3DWidget.h
lib/cpExtensions/QT/SimpleMPRWidget.cxx
lib/cpExtensions/Visualization/LUTImageActor.cxx
lib/cpPlugins/Interface/Plugins.cxx
plugins/ImageDistanceMaps/SignedMaurerDistanceMapImageFilter.cxx
plugins/ImageMeshFilters/RasterMeshFilter.cxx
plugins/ImageMeshFilters/RasterMeshFilter.h
plugins/Widgets/SplineWidget.cxx

index 00ff0e8e3e51bba97bd1d3d0614e81e975238a40..cff73bd429682fe983c287f966d16bc490953576 100644 (file)
@@ -63,6 +63,8 @@ int main( int argc, char* argv[] )
   auto spline = ws->GetFilter( "spline" );
   auto seeds = ws->GetFilter( "seeds" );
   auto axis = ws->GetFilter( "axis" );
+  auto writer = ws->GetFilter( "writer" );
+  auto raster = ws->GetFilter( "raster" );
 
   // Execute reader
   try
@@ -85,8 +87,8 @@ int main( int argc, char* argv[] )
     reader->GetOutputData< vtkImageData >( "Output" ), 2, "image"
     );
   spline->AddInteractor( view.GetInteractor( ) );
-  spline->Update( );
   seeds->AddInteractor( view.GetInteractor( ) );
+  spline->Update( );
   seeds->Update( );
 
   // Start application and show data
@@ -95,6 +97,8 @@ int main( int argc, char* argv[] )
   app.exec( );
   spline->Modified( );
   spline->Update( );
+  raster->Update( );
+  writer->Update( );
 
   wnd.show( );
   app.exec( );
diff --git a/lib/cpExtensions/Algorithms/RasterContourFilter.h b/lib/cpExtensions/Algorithms/RasterContourFilter.h
new file mode 100644 (file)
index 0000000..8d22bba
--- /dev/null
@@ -0,0 +1,92 @@
+// -------------------------------------------------------------------------
+// @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co)
+// -------------------------------------------------------------------------
+
+#ifndef __cpExtensions__Algorithms__RasterContourFilter__h__
+#define __cpExtensions__Algorithms__RasterContourFilter__h__
+
+#include <cpExtensions/Config.h>
+#include <itkImageSource.h>
+#include <vtkSmartPointer.h>
+
+// -------------------------------------------------------------------------
+class vtkPoints;
+class vtkPolygon;
+
+// -------------------------------------------------------------------------
+namespace cpExtensions
+{
+  namespace Algorithms
+  {
+    /**
+     */
+    template< class _TImage >
+    class RasterContourFilter
+      : public itk::ImageSource< _TImage >
+    {
+    public:
+      // Basic types
+      typedef RasterContourFilter             Self;
+      typedef itk::ImageSource< _TImage >     Superclass;
+      typedef itk::SmartPointer< Self >       Pointer;
+      typedef itk::SmartPointer< const Self > ConstPointer;
+
+      typedef _TImage TImage;
+      typedef typename _TImage::IndexType  TIndex;
+      typedef typename _TImage::PixelType  TPixel;
+      typedef typename _TImage::PointType  TPoint;
+      typedef typename _TImage::RegionType TRegion;
+      typedef itk::ImageBase< 2 > TImageBase;
+
+    public:
+      itkNewMacro( Self );
+      itkTypeMacro( RasterContourFilter, itk::ImageSource );
+
+      itkGetConstObjectMacro( Template, TImageBase );
+      itkGetConstMacro( InsideValue, TPixel );
+      itkGetConstMacro( OutsideValue, TPixel );
+
+      itkSetConstObjectMacro( Template, TImageBase );
+      itkSetMacro( InsideValue, TPixel );
+      itkSetMacro( OutsideValue, TPixel );
+
+    public:
+      void AddPoint( double x, double y );
+      void AddPoint( double p[ 2 ] );
+      void AddPoints( vtkPoints* points );
+      void ClearPoints( );
+
+    protected:
+      RasterContourFilter( );
+      virtual ~RasterContourFilter( );
+
+      virtual void AllocateOutputs( ) cpExtensions_OVERRIDE;
+      virtual void BeforeThreadedGenerateData( ) cpExtensions_OVERRIDE;
+      virtual void AfterThreadedGenerateData( ) cpExtensions_OVERRIDE;
+      virtual void ThreadedGenerateData(
+        const TRegion& region, itk::ThreadIdType id
+        ) cpExtensions_OVERRIDE;
+
+    private:
+      // Purposely not implemented
+      RasterContourFilter( const Self& );
+      void operator=( const Self& );
+
+    protected:
+      vtkSmartPointer< vtkPolygon >     m_Polygon;
+      typename TImageBase::ConstPointer m_Template;
+      TPixel m_InsideValue;
+      TPixel m_OutsideValue;
+    };
+
+  } // ecapseman
+
+} // ecapseman
+
+#ifndef ITK_MANUAL_INSTANTIATION
+#  include <cpExtensions/Algorithms/RasterContourFilter.hxx>
+#endif // ITK_MANUAL_INSTANTIATION
+
+#endif // __cpExtensions__Algorithms__RasterContourFilter__h__
+
+// eof - $RCSfile$
diff --git a/lib/cpExtensions/Algorithms/RasterContourFilter.hxx b/lib/cpExtensions/Algorithms/RasterContourFilter.hxx
new file mode 100644 (file)
index 0000000..2f7481f
--- /dev/null
@@ -0,0 +1,151 @@
+// -------------------------------------------------------------------------
+// @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co)
+// ------------------------------------------------------------------------
+
+// Inclusion test taken from:
+// https://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html
+
+#ifndef __cpExtensions__Algorithms__RasterContourFilter__hxx__
+#define __cpExtensions__Algorithms__RasterContourFilter__hxx__
+
+#include <itkImageRegionIteratorWithIndex.h>
+#include <vtkPolygon.h>
+
+// -------------------------------------------------------------------------
+template< class _TImage >
+void cpExtensions::Algorithms::RasterContourFilter< _TImage >::
+AddPoint( double x, double y )
+{
+  this->m_Polygon->GetPoints( )->InsertNextPoint( x, y, 0 );
+  this->Modified( );
+}
+
+// -------------------------------------------------------------------------
+template< class _TImage >
+void cpExtensions::Algorithms::RasterContourFilter< _TImage >::
+AddPoint( double p[ 2 ] )
+{
+  this->m_Polygon->GetPoints( )->InsertNextPoint( p[ 0 ], p[ 1 ], 0 );
+  this->Modified( );
+}
+
+// -------------------------------------------------------------------------
+template< class _TImage >
+void cpExtensions::Algorithms::RasterContourFilter< _TImage >::
+AddPoints( vtkPoints* points )
+{
+  double p[ 3 ];
+  for( unsigned long i = 0; i < points->GetNumberOfPoints( ); ++i )
+  {
+    points->GetPoint( i, p );
+    this->m_Polygon->GetPoints( )->InsertNextPoint( p[ 0 ], p[ 1 ], 0 );
+
+  } // rof
+  this->Modified( );
+}
+
+// -------------------------------------------------------------------------
+template< class _TImage >
+void cpExtensions::Algorithms::RasterContourFilter< _TImage >::
+ClearPoints( )
+{
+  this->m_Polygon = vtkSmartPointer< vtkPolygon >::New( );
+}
+
+// -------------------------------------------------------------------------
+template< class _TImage >
+cpExtensions::Algorithms::RasterContourFilter< _TImage >::
+RasterContourFilter( )
+  : Superclass( ),
+    m_InsideValue( TPixel( 1 ) ),
+    m_OutsideValue( TPixel( 0 ) )
+{
+  this->ClearPoints( );
+}
+
+// -------------------------------------------------------------------------
+template< class _TImage >
+cpExtensions::Algorithms::RasterContourFilter< _TImage >::
+~RasterContourFilter( )
+{
+}
+
+// -------------------------------------------------------------------------
+template< class _TImage >
+void cpExtensions::Algorithms::RasterContourFilter< _TImage >::
+AllocateOutputs( )
+{
+  _TImage* out = this->GetOutput( 0 );
+  out->SetSpacing( this->m_Template->GetSpacing( ) );
+  out->SetRegions( this->m_Template->GetRequestedRegion( ) );
+  out->SetOrigin( this->m_Template->GetOrigin( ) );
+  out->SetDirection( this->m_Template->GetDirection( ) );
+  out->Allocate( );
+}
+
+// -------------------------------------------------------------------------
+template< class _TImage >
+void cpExtensions::Algorithms::RasterContourFilter< _TImage >::
+BeforeThreadedGenerateData( )
+{
+}
+
+// -------------------------------------------------------------------------
+template< class _TImage >
+void cpExtensions::Algorithms::RasterContourFilter< _TImage >::
+AfterThreadedGenerateData( )
+{
+}
+
+// -------------------------------------------------------------------------
+template< class _TImage >
+void cpExtensions::Algorithms::RasterContourFilter< _TImage >::
+ThreadedGenerateData( const TRegion& region, itk::ThreadIdType id )
+{
+  vtkPoints* points = this->m_Polygon->GetPoints( );
+  unsigned long nPoints = points->GetNumberOfPoints( );
+  double* arr =
+    static_cast< double* >( points->GetData()->GetVoidPointer( 0 ) );
+  double p[ 3 ], n[ 3 ], b[ 6 ];
+  this->m_Polygon->GetPoints( )->GetBounds( b );
+  n[ 0 ] = n[ 1 ] = double( 0 );
+  n[ 2 ] = double( 1 );
+
+  _TImage* out = this->GetOutput( );
+  itk::ImageRegionIteratorWithIndex< _TImage > iIt( out, region );
+  for( iIt.GoToBegin( ); !iIt.IsAtEnd( ); ++iIt )
+  {
+    TIndex idx = iIt.GetIndex( );
+    TPoint pnt;
+    out->TransformIndexToPhysicalPoint( idx, pnt );
+    p[ 0 ] = pnt[ 0 ];
+    p[ 1 ] = pnt[ 1 ];
+    p[ 2 ] = double( 0 );
+
+    int i, j, c = 0;
+    int nvert = nPoints;
+    for( i = 0, j = nvert - 1; i < nvert; j = i++ )
+    {
+      double pi[ 3 ], pj[ 3 ];
+      points->GetPoint( i, pi );
+      points->GetPoint( j, pj );
+
+      if(
+        ( ( pi[ 1 ] > p[ 1 ] ) != ( pj[ 1 ] > p[ 1 ] ) ) &&
+        ( p[ 0 ] < ( pj[ 0 ] - pi[ 0 ] ) * ( p[ 1 ] - pi[ 1 ] ) / ( pj[ 1 ] - pi[ 1 ] ) + pi[ 0 ] )
+        )
+        c = !c;
+
+    } // rof
+
+    if( c != 0 )
+      iIt.Set( this->m_InsideValue );
+    else
+      iIt.Set( this->m_OutsideValue );
+
+  } // rof
+}
+
+#endif // __cpExtensions__Algorithms__RasterContourFilter__hxx__
+
+// eof - $RCSfile$
index a4770c08a0288ae8bce8d8735d8f898bbfe7a513..93cb1eb2d3f21fc4d0e2b472ae5d627e478af995 100644 (file)
@@ -1,6 +1,7 @@
 #include <cpExtensions/Utility.h>
 #include <cpExtensions/Interaction/ImageSliceStyle.h>
 #include <cpExtensions/Visualization/CursorActors.h>
+#include <cpExtensions/Visualization/LUTImageActor.h>
 #include <cpExtensions/Visualization/WindowLevelImageActor.h>
 #include <vtkAssemblyPath.h>
 #include <vtkImageData.h>
@@ -93,6 +94,8 @@ OnMouseWheelForward( )
   s += ( this->Interactor->GetShiftKey( ) == 1 )? 10: 1;
   this->m_WLActor->SetSliceNumber( s );
   s = this->m_WLActor->GetSliceNumber( );
+  if( this->m_LUTActor.GetPointer( ) != NULL )
+    this->m_LUTActor->SetSliceNumber( s );
   this->InvokeEvent( vtkCommand::UserEvent + 2, &s );
   this->Interactor->Render( );
   this->OnMouseMove( );
@@ -109,6 +112,8 @@ OnMouseWheelBackward( )
   s -= ( this->Interactor->GetShiftKey( ) == 1 )? 10: 1;
   this->m_WLActor->SetSliceNumber( s );
   s = this->m_WLActor->GetSliceNumber( );
+  if( this->m_LUTActor.GetPointer( ) != NULL )
+    this->m_LUTActor->SetSliceNumber( s );
   this->InvokeEvent( vtkCommand::UserEvent + 2, &s );
   this->Interactor->Render( );
   this->OnMouseMove( );
@@ -307,6 +312,13 @@ _PickPointOnImageActor( int idx[ 2 ], double pnt[ 3 ] )
     this->m_PropPicker->GetPickList( )->RemoveAllItems( );
     this->m_PropPicker->AddPickList( curr_actor );
 
+    auto props = this->CurrentRenderer->GetViewProps( );
+    this->m_LUTActor = NULL;
+    props->InitTraversal( );
+    vtkProp* prop;
+    while( ( ( prop = props->GetNextProp( ) ) != NULL ) && ( this->m_LUTActor.GetPointer( ) == NULL ) )
+      this->m_LUTActor = dynamic_cast< TLUTActor* >( prop );
+
     this->m_Cursor->SetImageBounds( curr_actor->GetImage( )->GetBounds( ) );
     this->m_Cursor->SetImageOrientation( curr_actor->GetOrientation( ) );
     this->m_Cursor->InitTraversal( );
index 9fa34499430c1672c0ab5fde7e904f274b14c829..6d2b11491b92669d3b185d12f673c7c2a0f0ade4 100644 (file)
@@ -15,6 +15,7 @@ namespace cpExtensions
   namespace Visualization
   {
     class CursorActors;
+    class LUTImageActor;
     class WindowLevelImageActor;
   }
   namespace Interaction
@@ -27,6 +28,7 @@ namespace cpExtensions
     public:
       typedef ImageSliceStyle Self;
       typedef cpExtensions::Visualization::CursorActors          TCursor;
+      typedef cpExtensions::Visualization::LUTImageActor         TLUTActor;
       typedef cpExtensions::Visualization::WindowLevelImageActor TWLActor;
 
     public:
@@ -70,6 +72,7 @@ namespace cpExtensions
 
     protected:
       vtkSmartPointer< vtkPropPicker > m_PropPicker;
+      vtkSmartPointer< TLUTActor >     m_LUTActor;
       vtkSmartPointer< TWLActor >      m_WLActor;
       vtkSmartPointer< TCursor >       m_Cursor;
       vtkSmartPointer< vtkTextActor >  m_Text;
index 1dcf2233bd28a4a94d3f2efc3270fa9fa9e49049..b6e348f5bce6d28484d517e1429a224fb04f4ad0 100644 (file)
@@ -93,6 +93,7 @@ void cpExtensions::Interaction::SeedWidget::
 _CompletedAction( vtkAbstractWidget* wdg )
 {
   // Do nothing
+  Self::CompletedAction( wdg );
 }
 
 // -------------------------------------------------------------------------
@@ -100,6 +101,7 @@ void cpExtensions::Interaction::SeedWidget::
 _MoveAction( vtkAbstractWidget* wdg )
 {
   // Do nothing
+  Self::MoveAction( wdg );
 }
 
 // -------------------------------------------------------------------------
@@ -107,6 +109,7 @@ void cpExtensions::Interaction::SeedWidget::
 _EndSelectAction( vtkAbstractWidget* wdg )
 {
   // Do nothing
+  Self::EndSelectAction( wdg );
 }
 
 // -------------------------------------------------------------------------
@@ -114,6 +117,7 @@ void cpExtensions::Interaction::SeedWidget::
 _DeleteAction( vtkAbstractWidget* wdg )
 {
   // Do nothing
+  Self::DeleteAction( wdg );
 }
 
 // -------------------------------------------------------------------------
index 60ca9a0ed1760f00dc7cb7f371d38e89dfe2d0a4..35557f5a9ee99330d34ffacfddfa260167d92c4f 100644 (file)
@@ -3,12 +3,15 @@
 #ifdef cpExtensions_QT4
 
 #include <cpExtensions/Interaction/ImageSliceStyle.h>
+#include <cpExtensions/Visualization/LUTImageActor.h>
 #include <cpExtensions/Visualization/MeshActor.h>
 #include <cpExtensions/Visualization/OutlineSource.h>
 #include <cpExtensions/Visualization/WindowLevelImageActor.h>
 
+#include <vtkActor.h>
 #include <vtkCamera.h>
 #include <vtkImageData.h>
+#include <vtkImageProperty.h>
 #include <vtkProperty.h>
 #include <vtkRenderer.h>
 
@@ -35,8 +38,12 @@ ImageWidget( QWidget* parent, Qt::WindowFlags f )
 cpExtensions::QT::ImageWidget::
 ~ImageWidget( )
 {
+  this->Clear( );
   if( this->m_OutlineActor != NULL )
     delete this->m_OutlineActor;
+  for( auto a = this->m_Actors.begin( ); a != this->m_Actors.end( ); ++a )
+    delete *a;
+  this->m_Actors.clear( );
 }
 
 // -------------------------------------------------------------------------
@@ -61,6 +68,9 @@ SetImage( vtkImageData* image, int orientation, const std::string& name )
   this->m_WLActor->SetImage( image );
   this->m_WLActor->SetOrientation( orientation );
 
+  this->m_LUTActor = vtkSmartPointer< TLUTActor >::New( );
+  this->m_LUTActor->SetOrientation( orientation );
+
   this->m_Outline = vtkSmartPointer< TOutline >::New( );
   this->m_Outline->SetBounds( image->GetBounds( ) );
   this->m_Outline->Update( );
@@ -87,6 +97,30 @@ SetImage( vtkImageData* image, int orientation, const std::string& name )
   this->ResetCamera( );
 }
 
+// -------------------------------------------------------------------------
+void cpExtensions::QT::ImageWidget::
+Add( vtkDataSet* data, const std::string& name )
+{
+  auto image = dynamic_cast< vtkImageData* >( data );
+  auto pdata = dynamic_cast< vtkPolyData* >( data );
+  if( image != NULL )
+  {
+    this->m_LUTActor->AddImage( image );
+    this->m_LUTActor->GetProperty( )->SetOpacity( 0.5 );
+    this->AddViewProp( this->m_LUTActor, "__LUT_IMAGE__" );
+    this->Render( );
+  }
+  else if( pdata != NULL )
+  {
+    TActor* actor = new TActor( );
+    actor->SetMesh( pdata );
+    this->m_Actors.push_back( actor );
+    this->AddViewProp( actor->GetActor( ), name );
+    this->Render( );
+
+  } // fi
+}
+
 // -------------------------------------------------------------------------
 void cpExtensions::QT::ImageWidget::
 ResetCamera( )
@@ -129,10 +163,10 @@ ResetCamera( )
       }
       else if( ori == 2 )
       {
-        if     ( this->m_Quadrant == 0 ) up[ 1 ] = double( 1 );
-        else if( this->m_Quadrant == 1 ) up[ 1 ] = double( 1 );
-        else if( this->m_Quadrant == 2 ) up[ 1 ] = double( 1 );
-        else if( this->m_Quadrant == 3 ) up[ 1 ] = double( 1 );
+        if     ( this->m_Quadrant == 0 ) up[ 1 ] = double( -1 );
+        else if( this->m_Quadrant == 1 ) up[ 1 ] = double( -1 );
+        else if( this->m_Quadrant == 2 ) up[ 1 ] = double( -1 );
+        else if( this->m_Quadrant == 3 ) up[ 1 ] = double( -1 );
         pos[ 2 ] *= double( -1 );
 
       } // fi
@@ -168,6 +202,36 @@ GetImageActor( ) const
   return( this->m_WLActor );
 }
 
+// -------------------------------------------------------------------------
+void cpExtensions::QT::ImageWidget::
+SetColor( const std::string& name, double r, double g, double b )
+{
+  auto props = this->GetViewProps( name );
+  for( auto p = props.begin( ); p != props.end( ); ++p )
+  {
+    auto actor = dynamic_cast< vtkActor* >( p->GetPointer( ) );
+    if( actor != NULL )
+      actor->GetProperty( )->SetColor( r, g, b );
+
+  } // rof
+  this->Render( );
+}
+
+// -------------------------------------------------------------------------
+void cpExtensions::QT::ImageWidget::
+SetLineWidth( const std::string& name, double w )
+{
+  auto props = this->GetViewProps( name );
+  for( auto p = props.begin( ); p != props.end( ); ++p )
+  {
+    auto actor = dynamic_cast< vtkActor* >( p->GetPointer( ) );
+    if( actor != NULL )
+      actor->GetProperty( )->SetLineWidth( w );
+
+  } // rof
+  this->Render( );
+}
+
 
 /* TODO
 // -------------------------------------------------------------------------
index c27855768d3ca8af6c8b339e5380909ae26559ae..3e3721ec6255988f3eace9aa7c93faba0d2d365e 100644 (file)
@@ -5,19 +5,18 @@
 
 #ifdef cpExtensions_QT4
 
-// TODO: class vtkDataSet;
+// -------------------------------------------------------------------------
+class vtkDataSet;
 
+// -------------------------------------------------------------------------
 namespace cpExtensions
 {
   namespace Visualization
   {
     class OutlineSource;
+    class LUTImageActor;
     class WindowLevelImageActor;
     class MeshActor;
-    /* TODO
-       class ImageSliceActors;
-       class ImageViewerActors;
-    */
   }
   namespace Interaction { class ImageSliceStyle; }
 
@@ -36,6 +35,7 @@ namespace cpExtensions
 
       typedef cpExtensions::Visualization::OutlineSource         TOutline;
       typedef cpExtensions::Visualization::MeshActor             TActor;
+      typedef cpExtensions::Visualization::LUTImageActor         TLUTActor;
       typedef cpExtensions::Visualization::WindowLevelImageActor TWLActor;
       typedef cpExtensions::Interaction::ImageSliceStyle         TStyle;
 
@@ -47,16 +47,19 @@ namespace cpExtensions
       void SetImage(
         vtkImageData* image, int orientation, const std::string& name
         );
+      void Add( vtkDataSet* data, const std::string& name );
       virtual void ResetCamera( ) cpExtensions_OVERRIDE;
 
       TWLActor* GetImageActor( );
       const TWLActor* GetImageActor( ) const;
 
+      void SetColor( const std::string& name, double r, double g, double b );
+      void SetLineWidth( const std::string& name, double w );
+
       /* TODO
          void SetImage(
          vtkImageData* image, int orientation, const std::string& name
          );
-         void Add( vtkDataSet* data, const std::string& name );
 
          // TODO: std::vector< vtkProp* > GetActors( const std::string& name ) const;
          int GetOrientation( ) const;
@@ -81,8 +84,10 @@ namespace cpExtensions
       std::string m_ImageName;
 
       vtkSmartPointer< TWLActor > m_WLActor;
+      vtkSmartPointer< TLUTActor > m_LUTActor;
       vtkSmartPointer< TOutline > m_Outline;
       TActor* m_OutlineActor;
+      std::vector< TActor* > m_Actors;
 
       vtkSmartPointer< TStyle > m_Style;
 
index 788fb22a44b86ce9015d2ee3426c466ad8a71f20..b4224a7a86bc96b347b5b139061640f8f846d9c0 100644 (file)
@@ -3,17 +3,18 @@
 #ifdef cpExtensions_QT4
 
 #include <cpExtensions/Visualization/ImageOutlineActor.h>
+#include <cpExtensions/Visualization/MeshActor.h>
 #include <cpExtensions/Visualization/WindowLevelImageActor.h>
 
 #include <vtkImageData.h>
 #include <vtkPlane.h>
+#include <vtkPolyData.h>
 
 /* TODO
    #include <cpExtensions/Visualization/MPR3DActors.h>
    #include <cpExtensions/Visualization/LUTImageActor.h>
 
    #include <vtkActor.h>
-   #include <vtkPolyData.h>
 */
 
 // -------------------------------------------------------------------------
@@ -32,6 +33,9 @@ MPR3DWidget( QWidget* parent, Qt::WindowFlags f )
 cpExtensions::QT::MPR3DWidget::
 ~MPR3DWidget( )
 {
+  for( auto a = this->m_Actors.begin( ); a != this->m_Actors.end( ); ++a )
+    delete *a;
+  this->m_Actors.clear( );
 }
 
 // -------------------------------------------------------------------------
@@ -70,6 +74,35 @@ SetImage( vtkImageData* image, const std::string& name )
   } // rof
 }
 
+// -------------------------------------------------------------------------
+void cpExtensions::QT::MPR3DWidget::
+Add( vtkDataSet* data, const std::string& name )
+{
+  auto image = dynamic_cast< vtkImageData* >( data );
+  auto pdata = dynamic_cast< vtkPolyData* >( data );
+  if( image != NULL )
+  {
+    /* TODO
+       if( this->m_ImageName != "" )
+       {
+       }
+       else
+       this->SetImage( image, name );
+    */
+  }
+  else if( pdata != NULL )
+  {
+    TActor* actor = new TActor( );
+    actor->SetMesh( pdata );
+    this->m_Actors.push_back( actor );
+    this->AddViewProp( actor->GetActor( ), name );
+    this->Render( );
+    if( this->m_ImageName == "" )
+      this->ResetCamera( );
+
+  } // fi
+}
+
 // -------------------------------------------------------------------------
 cpExtensions::QT::MPR3DWidget::
 TWLActor* cpExtensions::QT::MPR3DWidget::
@@ -145,50 +178,6 @@ SetImage( vtkImageData* image, const std::string& name )
   this->Render( );
 }
 
-// -------------------------------------------------------------------------
-void cpExtensions::QT::MPR3DWidget::
-Add( vtkDataSet* data, const std::string& name )
-{
-  auto image = dynamic_cast< vtkImageData* >( data );
-  auto pdata = dynamic_cast< vtkPolyData* >( data );
-  if( image != NULL )
-  {
-    if( this->m_ImageName != "" )
-    {
-    }
-    else
-      this->SetImage( image, name );
-  }
-  else if( pdata != NULL )
-  {
-    this->AddViewProp( this->m_Actors->AddMesh( pdata ), name );
-    this->Render( );
-    if( this->m_ImageName == "" )
-      this->ResetCamera( );
-
-  } // fi
-
-     return;
-
-     auto image = dynamic_cast< vtkImageData* >( data );
-     auto pdata = dynamic_cast< vtkPolyData* >( data );
-     if( image != NULL )
-     {
-     this->m_Actors->AddLUTImage( image );
-     vtkSmartPointer< vtkPropCollection > coll =
-     vtkSmartPointer< vtkPropCollection >::New( );
-     coll->AddItem( this->m_Actors->GetLUTImageActor( 0 ) );
-     coll->AddItem( this->m_Actors->GetLUTImageActor( 1 ) );
-     coll->AddItem( this->m_Actors->GetLUTImageActor( 2 ) );
-     this->AddViewProps( coll, name );
-     this->Render( );
-     }
-     else if( pdata != NULL )
-     {
-
-     } // fi
-}
-
 // -------------------------------------------------------------------------
 void cpExtensions::QT::MPR3DWidget::
 SetSliceNumber( int orientation, int slice )
index 6dcd86493ee3865f86df6a50f0b6705900b2ed75..667e0e2c7b00ef414aa313075b1cda5348faa68d 100644 (file)
@@ -14,6 +14,7 @@ namespace cpExtensions
   namespace Visualization
   {
     class ImageOutlineActor;
+    class MeshActor;
     class WindowLevelImageActor;
   }
 
@@ -30,6 +31,7 @@ namespace cpExtensions
       typedef MPR3DWidget                      Self;
       typedef cpExtensions::QT::RendererWidget Superclass;
 
+      typedef cpExtensions::Visualization::MeshActor             TActor;
       typedef cpExtensions::Visualization::ImageOutlineActor     TOLActor;
       typedef cpExtensions::Visualization::WindowLevelImageActor TWLActor;
 
@@ -39,6 +41,7 @@ namespace cpExtensions
 
       void Clear( );
       void SetImage( vtkImageData* image, const std::string& name );
+      void Add( vtkDataSet* data, const std::string& name );
 
       TWLActor* GetImageActor( int o );
       const TWLActor* GetImageActor( int o ) const;
@@ -48,7 +51,6 @@ namespace cpExtensions
 
       /* TODO
          void SetImage( vtkImageData* image, const std::string& name );
-         void Add( vtkDataSet* data, const std::string& name );
 
 
          void SetScalarRange( double r[ 2 ] );
@@ -62,6 +64,7 @@ namespace cpExtensions
 
       vtkSmartPointer< TWLActor > m_WLActors[ 3 ];
       vtkSmartPointer< TOLActor > m_OLActors[ 3 ];
+      std::vector< TActor* > m_Actors;
 
       /* TODO
          vtkSmartPointer< cpExtensions::Visualization::MPR3DActors > m_Actors;
index 95af5ab535561df63f344f260f3bb4e2dec80da6..665b0a187547937421e84281d75d6956d8cf0dec 100644 (file)
@@ -180,7 +180,6 @@ bool cpExtensions::QT::SimpleMPRWidget::
 Add( vtkDataSet* data, const std::string& name )
 {
   bool success = true;
-/*
   auto image = dynamic_cast< vtkImageData* >( data );
   auto pdata = dynamic_cast< vtkPolyData* >( data );
 
@@ -191,7 +190,7 @@ Add( vtkDataSet* data, const std::string& name )
       this->m_XImage->Add( image, name );
       this->m_YImage->Add( image, name );
       this->m_ZImage->Add( image, name );
-      this->m_3DView->Add( image, name );
+      // TODO: this->m_3DView->Add( image, name );
     }
     else
       this->SetImage( image, name );
@@ -200,7 +199,6 @@ Add( vtkDataSet* data, const std::string& name )
     this->m_3DView->Add( pdata, name );
   else
     success = false;
-*/
   return( success );
 }
 
index 1c9f9fac49cfbdfa6628f99ee96747d9d6753794..a022b309badf79d52369a0170bf5877ba4218c7d 100644 (file)
@@ -99,15 +99,26 @@ SetLUTColor( vtkImageData* image, double r, double g, double b, double a )
   this->SetLUTColor( this->GetImageId( image ), r, g, b, a );
 }
 
+// TODO: !!!!!
+#include <vtkImageCast.h>
+
 // -------------------------------------------------------------------------
 unsigned int cpExtensions::Visualization::LUTImageActor::
 AddImage( vtkImageData* image, double r, double g, double b, double a )
 {
+  static vtkSmartPointer< vtkImageCast > cast;
+  cast = vtkSmartPointer< vtkImageCast >::New( );
+
   if( image != NULL )
   {
+    cast->SetOutputScalarTypeToUnsignedChar( );
+    cast->SetInputData( image );
+    cast->Update( );
+
     this->m_Images.push_back( image );
     this->SetLUTColor( this->m_Images.size( ), r, g, b, a );
-    this->m_Blender->AddInputData( image );
+    this->m_Blender->AddInputData( cast->GetOutput( ) );
+    this->m_Blender->Update( );
 
     if( this->m_Images.size( ) == 1 )
     {
@@ -117,8 +128,6 @@ AddImage( vtkImageData* image, double r, double g, double b, double a )
         SetInputConnection( this->m_ImageMap->GetOutputPort( ) );
 
     } // fi
-    this->m_Blender->Modified( );
-    this->m_ImageMap->Modified( );
     this->Modified( );
 
     this->GetProperty( )->SetInterpolationTypeToNearest( );
index 8887f89f25f673d98f79ef0244367f7c847a2b2e..3e68371f1faa31fc9a99c8b73b44d616f6332a4c 100644 (file)
@@ -426,6 +426,12 @@ Plugins( )
     str << p << cpPlugins_ENV_SEPARATOR;
   str << ".";
   this->AddEnvironments( str.str( ) );
+
+  // Try to read locally defined paths
+  std::vector< std::string > tokens;
+  cpExtensions::Tokenize( tokens, str.str( ), cpPlugins_ENV_SEPARATOR );
+  for( auto t = tokens.begin( ); t != tokens.end( ); ++t )
+    this->OpenEnvironments( *t );
 }
 
 // -------------------------------------------------------------------------
index c3ba0b53b1e2db10e49a60e96ac02a4d73a6ff39..41001947368179dc1a9d1027488c5cd4a068f2ce 100644 (file)
@@ -46,7 +46,7 @@ _GenerateData( )
   auto o = this->GetInputData( "Input" );
   cpPlugins_Demangle_ImageScalars( o, _GD0, 2 );
   else cpPlugins_Demangle_ImageScalars( o, _GD0, 3 );
-  else this->_Error( "No valid input image." );
+  else this->_Error( "Invalid input image." );
 }
 
 // -------------------------------------------------------------------------
index f2ac07ffc53dc0858133c35bc2c93aca6a89ff44..4124cb1232db6b88ab851a75bedcbc062460f401 100644 (file)
@@ -1,15 +1,12 @@
 #include <plugins/ImageMeshFilters/RasterMeshFilter.h>
 #include <cpPlugins/DataObjects/BoundingBox.h>
 #include <cpPlugins/DataObjects/Mesh.h>
-
-#include <vtkImageData.h>
-#include <vtkImageStencil.h>
-#include <vtkLinearExtrusionFilter.h>
-#include <vtkPolyDataToImageStencil.h>
-#include <vtkStripper.h>
+#include <cpPlugins_ImageIterators.h>
 
 #include <itkTriangleMeshToBinaryImageFilter.h>
+#include <cpExtensions/Algorithms/RasterContourFilter.h>
 #include <itkTriangleMeshToBinaryImageFilter.hxx>
+#include <cpExtensions/Algorithms/RasterContourFilter.hxx>
 
 // -------------------------------------------------------------------------
 cpPluginsImageMeshFilters::RasterMeshFilter::
@@ -72,125 +69,24 @@ template< class _TMesh >
 void cpPluginsImageMeshFilters::RasterMeshFilter::
 _GD0_2D( _TMesh* mesh )
 {
+  typedef unsigned char _TPixel;
   typedef itk::ImageBase< 2 > _TImageBase;
-  typedef itk::Image< unsigned char, 2 > _TImage;
-  typedef cpPlugins::DataObjects::BoundingBox _TBB;
-  typedef typename _TImage::PointType _TPoint;
+  typedef itk::Image< _TPixel, 2 > _TImage;
+  typedef cpExtensions::Algorithms::RasterContourFilter< _TImage > _TFilter;
 
-  static const unsigned int PAD = 10;
-
-  _TImage::Pointer white = this->GetOutputData< _TImage >( "Output" );
-  if( white.IsNull( ) )
-    white = _TImage::New( );
-
-  // Get configuration values
-  typename _TImage::SpacingType spac;
-  typename _TImage::SizeType size;
-  typename _TImage::PointType origin;
-  typename _TImage::DirectionType direction;
-  typename _TImage::IndexType index;
-
-  auto in_bb = this->GetInput< _TBB >( "Template" );
   auto in_im = this->GetInputData< _TImageBase >( "Template" );
-  if( in_im != NULL )
-  {
-    spac = in_im->GetSpacing( );
-    size = in_im->GetLargestPossibleRegion( ).GetSize( );
-    origin = in_im->GetOrigin( );
-    direction = in_im->GetDirection( );
-    index = in_im->GetLargestPossibleRegion( ).GetIndex( );
-  }
-  else
-  {
-    _TPoint minBB, maxBB;
-    if( in_bb != NULL )
-    {
-      minBB = in_bb->GetMinimum< _TPoint >( );
-      maxBB = in_bb->GetMaximum< _TPoint >( );
-    }
-    else
-    {
-      double bounds[ 6 ];
-      mesh->GetBounds( bounds );
-      minBB[ 0 ] = bounds[ 0 ];
-      minBB[ 1 ] = bounds[ 1 ];
-      maxBB[ 0 ] = bounds[ 2 ];
-      maxBB[ 1 ] = bounds[ 3 ];
-
-    } // fi
-
-    double lx = double( maxBB[ 0 ] - minBB[ 0 ] );
-    double ly = double( maxBB[ 1 ] - minBB[ 1 ] );
-    double lm = ( lx < ly )? lx: ly;
-
-    // Compute spacing
-    spac.Fill( lm / double( this->m_Parameters.GetUint( "MinimumSize" ) ) );
-
-    // Compute size
-    size[ 0 ] = ( unsigned long )( std::ceil( lx / spac[ 0 ] ) );
-    size[ 1 ] = ( unsigned long )( std::ceil( ly / spac[ 1 ] ) );
-
-    // ... add some padding pixels
-    size[ 0 ] += PAD;
-    size[ 1 ] += PAD;
-
-    // Set origin
-    origin = minBB;
-    origin[ 0 ] -= double( PAD >> 1 ) * spac[ 0 ];
-    origin[ 1 ] -= double( PAD >> 1 ) * spac[ 1 ];
-
-    // Remaining values
-    direction.SetIdentity( );
-    index.Fill( 0 );
-
-  } // fi
-
-  // Configure output image
-  _TImage::RegionType region;
-  region.SetSize( size );
-  region.SetIndex( index );
-  white->SetSpacing( spac );
-  white->SetRegions( region );
-  white->SetOrigin( origin );
-  white->SetDirection( direction );
-  white->Allocate( );
-  white->FillBuffer( this->m_Parameters.GetUint( "InsideValue" ) );
-  if( this->m_WhiteImage.IsNull( ) )
-    this->m_WhiteImage = TImage::New( );
-  this->m_WhiteImage->SetITK( white );
-  vtkImageData* white_vtk = this->m_WhiteImage->GetVTK< vtkImageData >( );
-
-  // Configure mini-pipeline
-  if( this->m_Stripper.GetPointer( ) == NULL )
-    this->m_Stripper = vtkSmartPointer< vtkStripper >::New( );
-  this->m_Stripper->SetInputData( mesh );
-  this->m_Stripper->Update( );
-
-  if( this->m_Extruder.GetPointer( ) == NULL )
-    this->m_Extruder = vtkSmartPointer< vtkLinearExtrusionFilter >::New( );
-  this->m_Extruder->SetInputConnection( this->m_Stripper->GetOutputPort( ) );
-  this->m_Extruder->SetScaleFactor( double( 1 ) );
-  this->m_Extruder->SetExtrusionTypeToNormalExtrusion( );
-  this->m_Extruder->SetVector( 0, 0, 1 );
-  this->m_Extruder->Update( );
-
-  if( this->m_PolyDataToStencil.GetPointer( ) == NULL )
-    this->m_PolyDataToStencil =
-      vtkSmartPointer< vtkPolyDataToImageStencil >::New( );
-  this->m_PolyDataToStencil->SetTolerance( 0 );
-  this->m_PolyDataToStencil->SetInputConnection( this->m_Extruder->GetOutputPort( ) );
-  this->m_PolyDataToStencil->SetOutputOrigin( white_vtk->GetOrigin( ) );
-  this->m_PolyDataToStencil->SetOutputSpacing( white_vtk->GetSpacing( ) );
-  this->m_PolyDataToStencil->SetOutputWholeExtent( white_vtk->GetExtent( ) );
-  this->m_PolyDataToStencil->Update( );
-
-  this->m_ImageStencil = this->_CreateVTK< vtkImageStencil >( );
-  this->m_ImageStencil->SetInputData( white_vtk );
-  this->m_ImageStencil->SetStencilConnection( this->m_PolyDataToStencil->GetOutputPort( ) );
-  this->m_ImageStencil->ReverseStencilOff( );
-  this->m_ImageStencil->SetBackgroundValue( this->m_Parameters.GetUint( "OutsideValue" ) );
-  this->m_ImageStencil->Update( );
-  this->GetOutput( "Output" )->SetVTK( this->m_ImageStencil->GetOutput( ) );
+  if( in_im == NULL )
+    this->_Error( "A template is needed for 2D raster (this is temporal)." );
+  _TPixel inside = _TPixel( this->m_Parameters.GetUint( "InsideValue" ) );
+  _TPixel outside = _TPixel( this->m_Parameters.GetUint( "OutsideValue" ) );
+
+  auto filter = this->_CreateITK< _TFilter >( );
+  filter->AddPoints( mesh->GetPoints( ) );
+  filter->SetTemplate( in_im );
+  filter->SetInsideValue( inside );
+  filter->SetOutsideValue( outside );
+  filter->Update( );
+  this->GetOutput( "Output" )->SetITK( filter->GetOutput( ) );
 }
 
 // -------------------------------------------------------------------------
@@ -208,11 +104,6 @@ _GD0_3D( _TMesh* mesh )
   static const unsigned int PAD = 10;
 
   _TFilter* filter = this->_CreateITK< _TFilter >( );
-  this->m_WhiteImage = NULL;
-  this->m_Stripper = NULL;
-  this->m_Extruder = NULL;
-  this->m_PolyDataToStencil = NULL;
-  this->m_ImageStencil = NULL;
 
   // Get configuration values
   typename _TImage::SpacingType spac;
index d6c19539960c6866b81002279b76d7b09f691ad2..50f98599567903e078207b2562ee91028481a546 100644 (file)
@@ -6,13 +6,6 @@
 #include <cpPlugins/DataObjects/Image.h>
 #include <vtkSmartPointer.h>
 
-// -------------------------------------------------------------------------
-class vtkStripper;
-class vtkLinearExtrusionFilter;
-class vtkPolyDataToImageStencil;
-class vtkImageStencil;
-
-// -------------------------------------------------------------------------
 namespace cpPluginsImageMeshFilters
 {
   /**
@@ -35,13 +28,6 @@ namespace cpPluginsImageMeshFilters
 
     template< class _TMesh >
       inline void _GD0_3D( _TMesh* mesh );
-
-  protected:
-    TImage::Pointer m_WhiteImage;
-    vtkSmartPointer< vtkStripper > m_Stripper;
-    vtkSmartPointer< vtkLinearExtrusionFilter > m_Extruder;
-    vtkSmartPointer< vtkPolyDataToImageStencil > m_PolyDataToStencil;
-    vtkSmartPointer< vtkImageStencil > m_ImageStencil;
   };
 
 } // ecapseman
index 74680df762f5dd83805514c76f8f117dcaac4be4..1bba488aaa070f470e74a8148d017332f1b4bdbf 100644 (file)
@@ -115,200 +115,6 @@ _GenerateData( )
     this->m_Configured = true;
 
   } // fi
-
-  /* TODO
-
-     if( this->m_Configured )
-     {
-     if( points->GetNumberOfPoints( ) == 0 )
-     {
-     std::stringstream text;
-     bool start = true;
-     for( auto w = this->m_Widgets.begin( ); w != this->m_Widgets.end( ); ++w )
-     {
-     for( auto r = ( *w )->Widgets.begin( ); r != ( *w )->Widgets.end( ); ++r )
-     {
-     auto rep =
-     dynamic_cast< vtkSeedRepresentation* >(
-     ( *r )->GetRepresentation( )
-     );
-     if( rep != NULL )
-     {
-     double pos[ 3 ];
-     for( unsigned int i = 0; i < rep->GetNumberOfSeeds( ); ++i )
-     {
-     rep->GetSeedWorldPosition( i, pos );
-     if( !start )
-     text << "#";
-     start = false;
-     text << pos[ 0 ] << " " << pos[ 1 ] << " " << pos[ 2 ];
-     points->InsertNextPoint( pos );
-
-     } // rof
-
-     } // rof
-     ( *r )->EnabledOff( );
-
-     } // rof
-
-     } // rof
-     this->m_Parameters.SetString( "Text", text.str( ) );
-
-     } // fi
-     }
-     else
-     {
-     auto init_seeds = this->m_Parameters.GetString( "Text" );
-     std::vector< std::string > tokens;
-     cpExtensions::Tokenize( tokens, init_seeds, "#" );
-     for( auto tIt = tokens.begin( ); tIt != tokens.end( ); ++tIt )
-     {
-     std::vector< std::string > coords;
-     cpExtensions::Tokenize( coords, *tIt, " \t" );
-     int dim = ( coords.size( ) < 3 )? coords.size( ): 3;
-     double pos[ 3 ];
-     for( unsigned int d = 0; d < 3; ++d )
-     {
-     pos[ d ] = double( 0 );
-     if( d < dim )
-     {
-     std::istringstream value( coords[ d ] );
-     value >> pos[ d ];
-
-     } // fi
-
-     } // rof
-     verts->InsertNextCell( 1 );
-     verts->InsertCellPoint( points->GetNumberOfPoints( ) );
-     points->InsertNextPoint( pos );
-
-     } // rof
-     this->_Configure( );
-     this->Modified( );
-     this->m_Configured = true;
-
-     } // fi
-     this->GetOutput( "Output" )->SetVTK( pdata );
-  */
-}
-
-// -------------------------------------------------------------------------
-/* TODO
-void cpPluginsWidgets::SplineWidget::
-_Configure( )
-{
-  typedef cpPlugins::DataObjects::Image _TImage;
-
-  auto image = this->GetInput< _TImage >( "Input" );
-  if( image != NULL )
-  {
-    // Update actors
-    auto vtk_image = image->GetVTK< vtkImageData >( );
-    auto iIt = this->m_Interactors.begin( );
-    for( ; iIt != this->m_Interactors.end( ); ++iIt )
-    {
-      auto ren = ( *iIt )->GetInteractorStyle( )->GetCurrentRenderer( );
-      if( ren != NULL )
-      {
-        auto props = ren->GetViewProps( );
-        if( props != NULL )
-        {
-          props->InitTraversal( );
-          while( vtkProp* prop = props->GetNextProp( ) )
-          {
-            auto actor = dynamic_cast< TImageActor* >( prop );
-            if( actor != NULL )
-              if( actor->GetImage( ) == vtk_image )
-                this->m_Props[ actor ] = *iIt;
-
-          } // elihw
-
-        } // fi
-
-      } // fi
-
-    } // rof
-
-    // Process image
-    if( this->m_Props.size( ) > 0 )
-    {
-      cpPlugins_Demangle_ImageVisualDims( image->GetITK( ), _GD0_Image );
-      else this->_Error( "Invalid input image." );
-    }
-    else
-      this->_Error( "Could not create a valid widget: no actors." );
-  }
-  else
-    this->_Error( "Could not create a valid widget: no input." );
-}
-
-// -------------------------------------------------------------------------
-template< class _TImage >
-void cpPluginsWidgets::SplineWidget::
-_GD0_Image( _TImage* image )
-{
-  for( auto p = this->m_Props.begin( ); p != this->m_Props.end( ); ++p )
-  {
-    TWidgetData* d =
-      new TWidgetData(
-        this, dynamic_cast< TImageActor* >( p->first ), p->second
-        );
-    this->m_Widgets.push_back( d );
-
-  } // rof
-}
-
-// -------------------------------------------------------------------------
-cpPluginsWidgets::SplineWidget::TWidgetData::
-TWidgetData(
-  SplineWidget* seedWidget,
-  TImageActor* actor,
-  vtkRenderWindowInteractor* iren
-  )
-{
-  auto cb = vtkSmartPointer< SplineWidgetCallback >::New( );
-  cb->Widget = seedWidget;
-  cb->Data = this;
-  this->Command = cb;
-  actor->AddObserver( vtkCommand::InteractionEvent, cb );
-
-  auto image = actor->GetImage( );
-  int ori = actor->GetOrientation( );
-  int ext[ 6 ];
-  image->GetExtent( ext );
-  for( int i = ext[ ori << 1 ]; i <= ext[ ( ori << 1 ) + 1 ]; ++i )
-  {
-    auto placer = vtkSmartPointer< _TPlacer >::New( );
-    auto handle = vtkSmartPointer< vtkPointHandleRepresentation3D >::New( );
-    auto rep = vtkSmartPointer< vtkSeedRepresentation >::New( );
-    auto wdg = vtkSmartPointer< _TWidget >::New( );
-
-    placer->SetImageSlice( actor );
-    handle->GetProperty( )->SetColor( 1, 0, 0 );
-    handle->SetPointPlacer( placer );
-    rep->SetHandleRepresentation( handle );
-    wdg->SetRepresentation( rep );
-    wdg->SetInteractor( iren );
-    wdg->AddObserver( vtkCommand::PlacePointEvent, cb );
-    wdg->AddObserver( vtkCommand::CursorChangedEvent, cb );
-    wdg->EnabledOff( );
-
-    this->Widgets.push_back( wdg );
-    this->Placers.push_back( placer );
-    this->Handles.push_back( handle );
-    this->Representations.push_back( rep );
-
-  } // rof
-
-  this->ActualWidgetId = actor->GetSliceNumber( );
-  this->Widgets[ this->ActualWidgetId ]->EnabledOn( );
-}
-
-// -------------------------------------------------------------------------
-cpPluginsWidgets::SplineWidget::TWidgetData::
-~TWidgetData( )
-{
 }
-*/
 
 // eof - $RCSfile$