contrib/tbl/vipl/section/vipl_section_descriptor_2d.txx
Go to the documentation of this file.
00001 #ifndef vipl_section_descriptor_2d_txx_
00002 #define vipl_section_descriptor_2d_txx_
00003 //:
00004 //  \file
00005 
00006 #include "vipl_section_descriptor_2d.h"
00007 #include <vipl/section/vipl_section_container.h>
00008 #include <vcl_iostream.h>
00009 
00010 //: Ctor useful to define 2D section descriptors for ROA's. If you.
00011 // Once constructed there is no way to change the data in the section descriptor.
00012 template < class DataType >
00013 vipl_section_descriptor_2d< DataType > ::vipl_section_descriptor_2d(
00014                 int startx ,
00015                 int endx ,
00016                 int starty ,
00017                 int endy)
00018  : hsreal_descriptor (0),
00019    hsreal_container (0),
00020    hsi_data_ptr (0),
00021    hsi_data_offsets ( vcl_vector< int > () ),
00022    hsi_curr_sec_start ( vcl_vector< int > () ),
00023    hsi_curr_sec_end ( vcl_vector< int > () ),
00024    hsi_curr_sec_size ( vcl_vector< int > () )
00025 {
00026   vcl_cerr << "Warning: called unimplemented vipl_section_descriptor_2d constructor with signature "
00027            << "int startx, int endx, int starty, int endy\n";
00028 }
00029 
00030 //: Assigns the pointers directly. Does not attempt to deep copy them.
00031 template < class DataType >
00032   vipl_section_descriptor_2d< DataType > ::vipl_section_descriptor_2d(
00033                    vipl_section_descriptor< DataType >* desc ,
00034                  vipl_section_container< DataType >* container): hsreal_descriptor (0),
00035                  hsreal_container (0),
00036                  hsi_data_ptr (0),
00037                  hsi_data_offsets ( vcl_vector< int > () ),
00038                  hsi_curr_sec_start ( vcl_vector< int > () ),
00039                  hsi_curr_sec_end ( vcl_vector< int > () ),
00040                  hsi_curr_sec_size ( vcl_vector< int > () )
00041 {
00042   vcl_cerr << "Warning: called unimplemented constructor with signature "
00043            << "vipl_section_descriptor< DataType >* desc, vipl_section_container< DataType >* container\n";
00044 }
00045 
00046 //:  Deep-copies the pointers
00047 template < class DataType >
00048 vipl_section_descriptor_2d< DataType > ::vipl_section_descriptor_2d(
00049           const vipl_section_descriptor< DataType >* desc ,
00050           const vipl_section_container< DataType >* container ,
00051           int t): hsreal_descriptor (0),
00052           hsreal_container (0),
00053           hsi_data_ptr (0),
00054           hsi_data_offsets ( vcl_vector< int > () ),
00055           hsi_curr_sec_start ( vcl_vector< int > () ),
00056           hsi_curr_sec_end ( vcl_vector< int > () ),
00057           hsi_curr_sec_size ( vcl_vector< int > () )
00058 {
00059   vcl_cerr << "Warning: called unimplemented constructor with signature "
00060            << "const vipl_section_descriptor< DataType >* desc, const vipl_section_container< DataType >* container, int t\n";
00061 }
00062 
00063 template < class DataType >
00064 vipl_section_descriptor_2d< DataType > ::~vipl_section_descriptor_2d()
00065 {
00066 }
00067 
00068 template < class DataType >
00069 vipl_section_descriptor_2d< DataType > ::vipl_section_descriptor_2d(): hsreal_descriptor (0),
00070                  hsreal_container (0),
00071                  hsi_data_ptr (0),
00072                  hsi_data_offsets ( vcl_vector< int > () ),
00073                  hsi_curr_sec_start ( vcl_vector< int > () ),
00074                  hsi_curr_sec_end ( vcl_vector< int > () ),
00075                  hsi_curr_sec_size ( vcl_vector< int > () )
00076 // C++ auto-generated low-level constructor
00077 {
00078 }
00079 
00080 template < class DataType >
00081 vipl_section_descriptor_2d< DataType > ::vipl_section_descriptor_2d(const vipl_section_descriptor_2d< DataType > &t)
00082               :
00083   vipl_section_descriptor< DataType > (t),
00084                  hsreal_descriptor(t.hsreal_descriptor),
00085                  hsreal_container(t.hsreal_container),
00086                  hsi_data_ptr(t.hsi_data_ptr),
00087                  hsi_data_offsets(t.hsi_data_offsets),
00088                  hsi_curr_sec_start(t.hsi_curr_sec_start),
00089                  hsi_curr_sec_end(t.hsi_curr_sec_end),
00090                  hsi_curr_sec_size(t.hsi_curr_sec_size)
00091     // C++ auto-generated low-level copy constructor
00092 {
00093       // you can fill special ``copy constructor'' stuff here.
00094       // All dynamic/soft attributes are copied. Thus your
00095       //want to change it here is should be hard because it
00096       //is always changed!) So don't change things without
00097       //knowing their form.
00098 }
00099 
00100 #if 0 // not implemented
00101 //:
00102 // This method takes in an argument called axis (i.e. 0 means the ``x'' axis,
00103 // 1 means ``y'' axis etc...) and returns an integer which describes the start
00104 // coordinate value for ``x'' (or ``y'' etc..) with respect to the ``image''
00105 // coordinate system
00106 template < class DataType >
00107 int vipl_section_descriptor_2d< DataType > ::curr_sec_start( int axis) const
00108 {
00109 }
00110 
00111 //:
00112 // This method takes in an argument called axis (i.e. 0 means the ``x'' axis,
00113 // 1 means ``y'' axis etc...) and returns an integer which describes the end
00114 // coordinate value for ``x'' (or ``y'' etc..) with respect to the ``image''
00115 // coordinate system
00116 template < class DataType >
00117 int vipl_section_descriptor_2d< DataType > ::curr_sec_end( int axis) const
00118 {
00119 }
00120 
00121 //:
00122 // This method takes in an argument called axis (i.e. 0 means the ``x'' axis,
00123 // 1 means ``y'' axis etc...) and returns an integer which describes the size
00124 // of the axis (end minus start) for ``x'' (or ``y'' etc..) with respect to the
00125 // ``image'' coordinate system
00126 template < class DataType >
00127 int vipl_section_descriptor_2d< DataType > ::curr_sec_size( int axis) const
00128 {
00129 }
00130 
00131 //:
00132 // This method takes in an argument called axis (i.e. 0 means the ``x'' axis,
00133 // 1 means ``y'' axis etc...) and returns an integer which describes the offset
00134 // of the next (i.e. associated with the higher coordinate value) data item
00135 // along the axis.
00136 template < class DataType >
00137 int vipl_section_descriptor_2d< DataType > ::data_offsets( int axis) const
00138 {
00139 }
00140 
00141 //: Returns a referable pointer to the first data item in the current section.
00142 // If the value returned is null, then the address is not available to the filter.
00143 template < class DataType >
00144 DataType* vipl_section_descriptor_2d< DataType > ::data_ptr()
00145 {
00146 }
00147 
00148 //: Returns a const pointer to the first data item in the current section.
00149 // If the value returned is null, then the address is not available to the filter.
00150 template < class DataType >
00151 const DataType* vipl_section_descriptor_2d< DataType > ::data_ptr() const
00152 {
00153 }
00154 
00155 //: Returns a writable pointer to the ``real'' section descriptor.
00156 // If this method is called on a concrete instance, it should return 0.
00157 template < class DataType >
00158 vipl_section_descriptor< DataType >* vipl_section_descriptor_2d< DataType > ::inner_descriptor()
00159 {
00160 }
00161 
00162 //: Returns a const pointer to the ``real'' section descriptor.
00163 // If this method is called on a concrete instance, it should return 0.
00164 template < class DataType >
00165 const vipl_section_descriptor< DataType >* vipl_section_descriptor_2d< DataType > ::inner_descriptor() const
00166 {
00167 }
00168 
00169 //: Makes a new correct copy. It's just a bit more tricky because descriptors have pointers to its ``real instance''.
00170 template < class DataType >
00171 vipl_section_descriptor< DataType >* vipl_section_descriptor_2d< DataType > ::virtual_copy() const
00172 {
00173 }
00174 #endif
00175 
00176 #endif // vipl_section_descriptor_2d_txx_