]> Creatis software - cpPlugins.git/blob - plugins/ITKSliceFilters/CPRImageFilter.cxx
...
[cpPlugins.git] / plugins / ITKSliceFilters / CPRImageFilter.cxx
1 #include <ITKSliceFilters/CPRImageFilter.h>
2
3 /* TODO
4    #include <cpInstances/Image.h>
5    #include <cpInstances/Simple3DCurve.h>
6
7    #include <itkImage.h>
8    #include <cpExtensions/DataStructures/Simple3DCurve.h>
9    #include <cpExtensions/Algorithms/CPRImageFilter.h>
10 */
11
12 // -------------------------------------------------------------------------
13 cpPluginsITKSliceFilters::CPRImageFilter::
14 CPRImageFilter( )
15   : Superclass( )
16 {
17   /* TODO
18      typedef cpInstances::Image         _TImage;
19      typedef cpInstances::Simple3DCurve _TCurve;
20      this->_ConfigureInput< _TImage >( "Image", true, false );
21      this->_ConfigureInput< _TCurve >( "Curve", true, false );
22      this->_ConfigureOutput< _TImage >( "Output" );
23
24      this->m_Parameters.ConfigureAsReal( "SliceRadius", 1 );
25   */
26 }
27
28 // -------------------------------------------------------------------------
29 cpPluginsITKSliceFilters::CPRImageFilter::
30 ~CPRImageFilter( )
31 {
32 }
33
34 // -------------------------------------------------------------------------
35 void cpPluginsITKSliceFilters::CPRImageFilter::
36 _GenerateData( )
37 {
38   /* TODO
39      auto o = this->GetInputData( "Image" );
40      cpPlugins_Demangle_Image_ScalarPixels_1( o, _GD0, 3 )
41      this->_Error( "Invalid input image." );
42   */
43 }
44
45 // -------------------------------------------------------------------------
46 template< class _TImage >
47 void cpPluginsITKSliceFilters::CPRImageFilter::
48 _GD0( _TImage* image )
49 {
50   /* TODO
51      auto o = this->GetInputData( "Curve" );
52      cpPlugins_Demangle_Simple3DCurve_All_2( o, _GD1, image )
53      this->_Error( "Invalid input curve." );
54   */
55 }
56
57 // -------------------------------------------------------------------------
58 template< class _TCurve, class _TImage >
59 void cpPluginsITKSliceFilters::CPRImageFilter::
60 _GD1( _TCurve* curve, _TImage* image )
61 {
62   /* TODO
63      typedef cpExtensions::Algorithms::CPRImageFilter< _TImage, _TCurve > _TFilter;
64
65      auto filter = this->_CreateITK< _TFilter >( );
66      filter->SetInput( image );
67      filter->SetCurve( curve );
68      filter->SetSliceRadius( this->m_Parameters.GetReal( "SliceRadius" ) );
69      filter->Update( );
70      this->GetOutput( "Output" )->SetITK( filter->GetOutput( ) );
71   */
72 }
73
74 // eof - $RCSfile$