Public Member Functions | Protected Member Functions | Private Attributes | Friends
vipl_section_descriptor< DataType > Class Template Reference

#include <vipl_section_descriptor.h>

Inheritance diagram for vipl_section_descriptor< DataType >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 vipl_section_descriptor (vcl_vector< int > &startpts, vcl_vector< int > &endpts)
 A simple section_descriptor useful for filter Regions_of_Application.
virtual ~vipl_section_descriptor ()
 vipl_section_descriptor ()
 vipl_section_descriptor (const vipl_section_descriptor< DataType > &)
virtual int curr_sec_start (int axis) const
 This method takes in an integer argument called axis (i.e.
virtual int curr_sec_end (int axis) const
 This method takes in an integer argument called axis (i.e.
virtual int curr_sec_size (int axis) const
 This method takes in an integer argument called axis (i.e.
virtual int data_offsets (int axis) const
 This method takes in an integer argument called axis (i.e.
virtual DataType * data_ptr ()
 Returns a referable pointer to the first data item in the current section.
virtual const DataType * data_ptr () const
 Returns a const pointer to the first data item in the current section.
virtual
vipl_section_descriptor
< DataType > * 
inner_descriptor ()
 Returns a writable pointer to the ``real'' section descriptor.
virtual const
vipl_section_descriptor
< DataType > * 
inner_descriptor () const
 Returns a const pointer to the ``real'' section descriptor.
int restrict (const vipl_section_descriptor< DataType > &ROA)
 This method takes in a section_descriptor (which can be thought of as a filter's ROA) and updates this section to be the intersection of the ROA and the original section.
virtual
vipl_section_descriptor
< DataType > * 
virtual_copy () const
 Makes a new correct copy.
vipl_section_descriptor
< DataType > * 
real_descriptor () const
vipl_section_descriptor
< DataType > *& 
ref_real_descriptor ()
void put_real_descriptor (vipl_section_descriptor< DataType > *v)
vipl_section_container
< DataType > * 
real_container () const
vipl_section_container
< DataType > *& 
ref_real_container ()
void put_real_container (vipl_section_container< DataType > *v)
DataType * i_data_ptr () const
DataType *& ref_i_data_ptr ()
void put_i_data_ptr (DataType *v)
vcl_vector< int > const & i_data_offsets () const
vcl_vector< int > & ref_i_data_offsets ()
void put_i_data_offsets (vcl_vector< int > const &v)
vcl_vector< int > const & i_curr_sec_start () const
vcl_vector< int > & ref_i_curr_sec_start ()
void put_i_curr_sec_start (vcl_vector< int > const &v)
vcl_vector< int > const & i_curr_sec_end () const
 This method takes in an integer argument called axis (i.e.
vcl_vector< int > & ref_i_curr_sec_end ()
void put_i_curr_sec_end (vcl_vector< int > const &v)
vcl_vector< int > const & i_curr_sec_size () const
vcl_vector< int > & ref_i_curr_sec_size ()
void put_i_curr_sec_size (vcl_vector< int > const &v)
int refcount () const
int inc_refcount ()
int dec_refcount ()

Protected Member Functions

 vipl_section_descriptor (vipl_section_descriptor< DataType > *desc, vipl_section_container< DataType > *container)
 Assigns the pointers directly. Does not attempt to deep copy them.
 vipl_section_descriptor (const vipl_section_descriptor< DataType > *desc, const vipl_section_container< DataType > *container, int t)
 Deep-copies the pointers.

Private Attributes

vipl_section_descriptor
< DataType > * 
hsreal_descriptor
vipl_section_container
< DataType > * 
hsreal_container
DataType * hsi_data_ptr
vcl_vector< int > hsi_data_offsets
vcl_vector< int > hsi_curr_sec_start
vcl_vector< int > hsi_curr_sec_end
vcl_vector< int > hsi_curr_sec_size
int refcount_

Friends

class vipl_section_container< DataType >
class vipl_section_iterator< DataType >

Detailed Description

template<class DataType>
class vipl_section_descriptor< DataType >

Definition at line 16 of file vipl_section_descriptor.h.


Constructor & Destructor Documentation

template<class DataType>
vipl_section_descriptor< DataType >::vipl_section_descriptor ( vipl_section_descriptor< DataType > *  desc,
vipl_section_container< DataType > *  container 
) [protected]

Assigns the pointers directly. Does not attempt to deep copy them.

Definition at line 21 of file vipl_section_descriptor.txx.

template<class DataType>
vipl_section_descriptor< DataType >::vipl_section_descriptor ( const vipl_section_descriptor< DataType > *  desc,
const vipl_section_container< DataType > *  container,
int  t 
) [protected]

Deep-copies the pointers.

Definition at line 47 of file vipl_section_descriptor.txx.

template<class DataType>
vipl_section_descriptor< DataType >::vipl_section_descriptor ( vcl_vector< int > &  startpts,
vcl_vector< int > &  endpts 
)

A simple section_descriptor useful for filter Regions_of_Application.

it is not associated with any container or ``real'' descriptor. It cannot verify that the start/end points are meaningful for a particular image (there is none associated with it), but if used for the ROA of a filter this can be used to limit its operation to only a small window within the image.

It is not associated with any container or ``real'' descriptor. It cannot verify that the start/end points are meaningful for a particular image (there is none associated with it), but if used for the ROA of a filter this can be used to limit its operation to only a small window within the image.

Definition at line 75 of file vipl_section_descriptor.txx.

template<class DataType >
vipl_section_descriptor< DataType >::~vipl_section_descriptor ( ) [virtual]

Definition at line 94 of file vipl_section_descriptor.txx.

template<class DataType>
vipl_section_descriptor< DataType >::vipl_section_descriptor ( )

Definition at line 106 of file vipl_section_descriptor.txx.

template<class DataType>
vipl_section_descriptor< DataType >::vipl_section_descriptor ( const vipl_section_descriptor< DataType > &  t)

Definition at line 121 of file vipl_section_descriptor.txx.


Member Function Documentation

template<class DataType>
virtual int vipl_section_descriptor< DataType >::curr_sec_end ( int  axis) const [inline, virtual]

This method takes in an integer argument called axis (i.e.

0 means the ``x'' axis, 1 means ``y'' axis etc...) and returns an integer which describes the end coordinate value for ``x'' (or ``y'' etc..) with respect to the ``image'' coordinate system.

Definition at line 67 of file vipl_section_descriptor.h.

template<class DataType>
virtual int vipl_section_descriptor< DataType >::curr_sec_size ( int  axis) const [inline, virtual]

This method takes in an integer argument called axis (i.e.

0 means the ``x'' axis, 1 means ``y'' axis etc...) and returns an integer which describes the size of the axis (end minus start) for ``x'' (or ``y'' etc..) with respect to the ``image'' coordinate system.

Definition at line 75 of file vipl_section_descriptor.h.

template<class DataType>
virtual int vipl_section_descriptor< DataType >::curr_sec_start ( int  axis) const [inline, virtual]

This method takes in an integer argument called axis (i.e.

0 means the ``x'' axis, 1 means ``y'' axis etc...) and returns an integer which describes the start coordinate value for ``x'' (or ``y'' etc..) with respect to the ``image'' coordinate system.

Definition at line 60 of file vipl_section_descriptor.h.

template<class DataType >
int vipl_section_descriptor< DataType >::data_offsets ( int  axis) const [virtual]

This method takes in an integer argument called axis (i.e.

This method takes in an argument called axis (i.e.

0 means the ``x'' axis, 1 means ``y'' axis etc...) and returns an integer which describes the offset of the next (i.e. associated with the higher coordinate value) data item along the axis.

Definition at line 149 of file vipl_section_descriptor.txx.

template<class DataType >
DataType * vipl_section_descriptor< DataType >::data_ptr ( ) [virtual]

Returns a referable pointer to the first data item in the current section.

If the value returned is null, then the address is not available to the filter.

If the value returned is 0, then the address is not available to the filter.

Definition at line 158 of file vipl_section_descriptor.txx.

template<class DataType >
const DataType * vipl_section_descriptor< DataType >::data_ptr ( ) const [virtual]

Returns a const pointer to the first data item in the current section.

If the value returned is null, then the address is not available to the filter.

If the value returned is 0, then the address is not available to the filter.

Definition at line 167 of file vipl_section_descriptor.txx.

template<class DataType>
int vipl_section_descriptor< DataType >::dec_refcount ( ) [inline]

Definition at line 151 of file vipl_section_descriptor.h.

template<class DataType>
vcl_vector< int > const& vipl_section_descriptor< DataType >::i_curr_sec_end ( ) const [inline]

This method takes in an integer argument called axis (i.e.

0 means the ``x'' axis, 1 means ``y'' axis etc...) and returns an integer which describes the end coordinate value for ``x'' (or ``y'' etc..) with respect to the ``image'' coordinate system.

Reimplemented in vipl_section_descriptor_2d< DataType >.

Definition at line 140 of file vipl_section_descriptor.h.

template<class DataType>
vcl_vector< int > const& vipl_section_descriptor< DataType >::i_curr_sec_size ( ) const [inline]

Reimplemented in vipl_section_descriptor_2d< DataType >.

Definition at line 143 of file vipl_section_descriptor.h.

template<class DataType>
vcl_vector< int > const& vipl_section_descriptor< DataType >::i_curr_sec_start ( ) const [inline]

Reimplemented in vipl_section_descriptor_2d< DataType >.

Definition at line 132 of file vipl_section_descriptor.h.

template<class DataType>
vcl_vector< int > const& vipl_section_descriptor< DataType >::i_data_offsets ( ) const [inline]

Reimplemented in vipl_section_descriptor_2d< DataType >.

Definition at line 129 of file vipl_section_descriptor.h.

template<class DataType>
DataType* vipl_section_descriptor< DataType >::i_data_ptr ( ) const [inline]

Reimplemented in vipl_section_descriptor_2d< DataType >.

Definition at line 126 of file vipl_section_descriptor.h.

template<class DataType>
int vipl_section_descriptor< DataType >::inc_refcount ( ) [inline]

Definition at line 150 of file vipl_section_descriptor.h.

template<class DataType>
virtual vipl_section_descriptor< DataType >* vipl_section_descriptor< DataType >::inner_descriptor ( ) [inline, virtual]

Returns a writable pointer to the ``real'' section descriptor.

If this method is called on a concrete instance, it should return 0.

Definition at line 99 of file vipl_section_descriptor.h.

template<class DataType>
virtual const vipl_section_descriptor< DataType >* vipl_section_descriptor< DataType >::inner_descriptor ( ) const [inline, virtual]

Returns a const pointer to the ``real'' section descriptor.

If this method is called on a concrete instance, it should return 0.

Definition at line 104 of file vipl_section_descriptor.h.

template<class DataType>
void vipl_section_descriptor< DataType >::put_i_curr_sec_end ( vcl_vector< int > const &  v) [inline]

Reimplemented in vipl_section_descriptor_2d< DataType >.

Definition at line 142 of file vipl_section_descriptor.h.

template<class DataType>
void vipl_section_descriptor< DataType >::put_i_curr_sec_size ( vcl_vector< int > const &  v) [inline]

Reimplemented in vipl_section_descriptor_2d< DataType >.

Definition at line 145 of file vipl_section_descriptor.h.

template<class DataType>
void vipl_section_descriptor< DataType >::put_i_curr_sec_start ( vcl_vector< int > const &  v) [inline]

Reimplemented in vipl_section_descriptor_2d< DataType >.

Definition at line 134 of file vipl_section_descriptor.h.

template<class DataType>
void vipl_section_descriptor< DataType >::put_i_data_offsets ( vcl_vector< int > const &  v) [inline]

Reimplemented in vipl_section_descriptor_2d< DataType >.

Definition at line 131 of file vipl_section_descriptor.h.

template<class DataType>
void vipl_section_descriptor< DataType >::put_i_data_ptr ( DataType *  v) [inline]

Reimplemented in vipl_section_descriptor_2d< DataType >.

Definition at line 128 of file vipl_section_descriptor.h.

template<class DataType>
void vipl_section_descriptor< DataType >::put_real_container ( vipl_section_container< DataType > *  v) [inline]

Reimplemented in vipl_section_descriptor_2d< DataType >.

Definition at line 125 of file vipl_section_descriptor.h.

template<class DataType>
void vipl_section_descriptor< DataType >::put_real_descriptor ( vipl_section_descriptor< DataType > *  v) [inline]

Reimplemented in vipl_section_descriptor_2d< DataType >.

Definition at line 122 of file vipl_section_descriptor.h.

template<class DataType>
vipl_section_container< DataType >* vipl_section_descriptor< DataType >::real_container ( ) const [inline]

Reimplemented in vipl_section_descriptor_2d< DataType >.

Definition at line 123 of file vipl_section_descriptor.h.

template<class DataType>
vipl_section_descriptor< DataType >* vipl_section_descriptor< DataType >::real_descriptor ( ) const [inline]

Reimplemented in vipl_section_descriptor_2d< DataType >.

Definition at line 120 of file vipl_section_descriptor.h.

template<class DataType>
vcl_vector< int >& vipl_section_descriptor< DataType >::ref_i_curr_sec_end ( ) [inline]

Reimplemented in vipl_section_descriptor_2d< DataType >.

Definition at line 141 of file vipl_section_descriptor.h.

template<class DataType>
vcl_vector< int >& vipl_section_descriptor< DataType >::ref_i_curr_sec_size ( ) [inline]

Reimplemented in vipl_section_descriptor_2d< DataType >.

Definition at line 144 of file vipl_section_descriptor.h.

template<class DataType>
vcl_vector< int >& vipl_section_descriptor< DataType >::ref_i_curr_sec_start ( ) [inline]

Reimplemented in vipl_section_descriptor_2d< DataType >.

Definition at line 133 of file vipl_section_descriptor.h.

template<class DataType>
vcl_vector< int >& vipl_section_descriptor< DataType >::ref_i_data_offsets ( ) [inline]

Reimplemented in vipl_section_descriptor_2d< DataType >.

Definition at line 130 of file vipl_section_descriptor.h.

template<class DataType>
DataType* & vipl_section_descriptor< DataType >::ref_i_data_ptr ( ) [inline]

Reimplemented in vipl_section_descriptor_2d< DataType >.

Definition at line 127 of file vipl_section_descriptor.h.

template<class DataType>
vipl_section_container< DataType >* & vipl_section_descriptor< DataType >::ref_real_container ( ) [inline]

Reimplemented in vipl_section_descriptor_2d< DataType >.

Definition at line 124 of file vipl_section_descriptor.h.

template<class DataType>
vipl_section_descriptor< DataType >* & vipl_section_descriptor< DataType >::ref_real_descriptor ( ) [inline]

Reimplemented in vipl_section_descriptor_2d< DataType >.

Definition at line 121 of file vipl_section_descriptor.h.

template<class DataType>
int vipl_section_descriptor< DataType >::refcount ( ) const [inline]

Definition at line 149 of file vipl_section_descriptor.h.

template<class DataType>
int vipl_section_descriptor< DataType >::restrict ( const vipl_section_descriptor< DataType > &  ROA)

This method takes in a section_descriptor (which can be thought of as a filter's ROA) and updates this section to be the intersection of the ROA and the original section.

It returns 0 if the region is empty, 1 if nothing changed and 2 if there was really a change in the section.

Definition at line 179 of file vipl_section_descriptor.txx.

template<class DataType >
vipl_section_descriptor< DataType > * vipl_section_descriptor< DataType >::virtual_copy ( ) const [virtual]

Makes a new correct copy.

Makes a new correct copy. It's just a bit more tricky because descriptors have pointers to its ``real instance''.

It's just a bit more tricky because descriptors have pointers to its ``real instance.''

Definition at line 186 of file vipl_section_descriptor.txx.


Friends And Related Function Documentation

template<class DataType>
friend class vipl_section_container< DataType > [friend]

Reimplemented in vipl_section_descriptor_2d< DataType >.

Definition at line 18 of file vipl_section_descriptor.h.

template<class DataType>
friend class vipl_section_iterator< DataType > [friend]

Reimplemented in vipl_section_descriptor_2d< DataType >.

Definition at line 19 of file vipl_section_descriptor.h.


Member Data Documentation

template<class DataType>
vcl_vector< int > vipl_section_descriptor< DataType >::hsi_curr_sec_end [private]

Reimplemented in vipl_section_descriptor_2d< DataType >.

Definition at line 26 of file vipl_section_descriptor.h.

template<class DataType>
vcl_vector< int > vipl_section_descriptor< DataType >::hsi_curr_sec_size [private]

Reimplemented in vipl_section_descriptor_2d< DataType >.

Definition at line 27 of file vipl_section_descriptor.h.

template<class DataType>
vcl_vector< int > vipl_section_descriptor< DataType >::hsi_curr_sec_start [private]

Reimplemented in vipl_section_descriptor_2d< DataType >.

Definition at line 25 of file vipl_section_descriptor.h.

template<class DataType>
vcl_vector< int > vipl_section_descriptor< DataType >::hsi_data_offsets [private]

Reimplemented in vipl_section_descriptor_2d< DataType >.

Definition at line 24 of file vipl_section_descriptor.h.

template<class DataType>
DataType* vipl_section_descriptor< DataType >::hsi_data_ptr [private]

Reimplemented in vipl_section_descriptor_2d< DataType >.

Definition at line 23 of file vipl_section_descriptor.h.

template<class DataType>
vipl_section_container< DataType >* vipl_section_descriptor< DataType >::hsreal_container [private]

Reimplemented in vipl_section_descriptor_2d< DataType >.

Definition at line 22 of file vipl_section_descriptor.h.

template<class DataType>
vipl_section_descriptor< DataType >* vipl_section_descriptor< DataType >::hsreal_descriptor [private]

Reimplemented in vipl_section_descriptor_2d< DataType >.

Definition at line 21 of file vipl_section_descriptor.h.

template<class DataType>
int vipl_section_descriptor< DataType >::refcount_ [private]

Definition at line 148 of file vipl_section_descriptor.h.


The documentation for this class was generated from the following files: