iRoCS Toolbox  1.1.0
Public Member Functions
atb::CropBoundaryTreatment< DataT, Dim > Class Template Reference

The CropBoundaryTreatment class has actually no function. More...

#include "libArrayToolbox/BoundaryTreatment.hh"

Inheritance diagram for atb::CropBoundaryTreatment< DataT, Dim >:
Collaboration diagram for atb::CropBoundaryTreatment< DataT, Dim >:

Public Member Functions

 CropBoundaryTreatment ()
 Constructor. More...
 
 CropBoundaryTreatment (CropBoundaryTreatment< DataT, Dim > const &bt)
 Copy Constructor. More...
 
 ~CropBoundaryTreatment ()
 Destructor. More...
 
BoundaryTreatment< DataT, Dim > * clone () const
 Get a deep copy of this BoundaryTreatment object. More...
 
DataT get (blitz::Array< DataT, Dim > const &data, blitz::TinyVector< ptrdiff_t, Dim > pos) const
 Get the Array value at the given position. More...
 
DataT get (DataT const *data, ptrdiff_t pos, ptrdiff_t length) const
 Get the C-array value at the given position. More...
 
blitz::TinyVector< ptrdiff_t, Dim > getIndex (blitz::TinyVector< ptrdiff_t, Dim > pos, blitz::TinyVector< ptrdiff_t, Dim > const &shape) const
 Get the in-Array-Index to the given position. More...
 
ptrdiff_t getIndex (ptrdiff_t pos, ptrdiff_t length) const
 Get the in-array-index to the given position. More...
 
CropBoundaryTreatment< DataT, Dim > & operator= (CropBoundaryTreatment< DataT, Dim > const &bt)
 Copy assignment operator. More...
 
bool providesIndices () const
 The returned boolean indicates, whether the boundary treatment is able to transform the incoming coordinates into valid Array coordinates and therefore it indicates, whether the function getIndex() returns valid in-Array-positions. More...
 
BoundaryTreatmentType type () const
 Get the corresponding enumeration value for the boundary treatment type. More...
 

Detailed Description

template<typename DataT, int Dim>
class atb::CropBoundaryTreatment< DataT, Dim >

The CropBoundaryTreatment class has actually no function.

It only exists for convenience and throws a RuntimeError when used with out-of-Array positions, because, there is no defined behaviour in those cases.

Definition at line 859 of file BoundaryTreatment.hh.

Constructor & Destructor Documentation

◆ CropBoundaryTreatment() [1/2]

template<typename DataT, int Dim>
atb::CropBoundaryTreatment< DataT, Dim >::CropBoundaryTreatment ( )

Constructor.

◆ CropBoundaryTreatment() [2/2]

template<typename DataT, int Dim>
atb::CropBoundaryTreatment< DataT, Dim >::CropBoundaryTreatment ( CropBoundaryTreatment< DataT, Dim > const &  bt)

Copy Constructor.

Parameters
btThe BoundaryTreatment object to copy

◆ ~CropBoundaryTreatment()

template<typename DataT, int Dim>
atb::CropBoundaryTreatment< DataT, Dim >::~CropBoundaryTreatment ( )

Destructor.

Member Function Documentation

◆ operator=()

template<typename DataT, int Dim>
CropBoundaryTreatment<DataT,Dim>& atb::CropBoundaryTreatment< DataT, Dim >::operator= ( CropBoundaryTreatment< DataT, Dim > const &  bt)

Copy assignment operator.

Parameters
btThe BoundaryTreatment object to copy
Returns
A reference to this BoundaryTreatment object for operator chaining

◆ clone()

template<typename DataT, int Dim>
BoundaryTreatment<DataT,Dim>* atb::CropBoundaryTreatment< DataT, Dim >::clone ( ) const
virtual

Get a deep copy of this BoundaryTreatment object.

Returns
A deep copy of this BoundaryTreatment object

Implements atb::BoundaryTreatment< DataT, Dim >.

◆ type()

template<typename DataT, int Dim>
BoundaryTreatmentType atb::CropBoundaryTreatment< DataT, Dim >::type ( ) const
virtual

Get the corresponding enumeration value for the boundary treatment type.

Returns
CropBT

Implements atb::BoundaryTreatment< DataT, Dim >.

◆ providesIndices()

template<typename DataT, int Dim>
bool atb::CropBoundaryTreatment< DataT, Dim >::providesIndices ( ) const
virtual

The returned boolean indicates, whether the boundary treatment is able to transform the incoming coordinates into valid Array coordinates and therefore it indicates, whether the function getIndex() returns valid in-Array-positions.

Returns
false

Implements atb::BoundaryTreatment< DataT, Dim >.

◆ get() [1/2]

template<typename DataT, int Dim>
DataT atb::CropBoundaryTreatment< DataT, Dim >::get ( blitz::Array< DataT, Dim > const &  data,
blitz::TinyVector< ptrdiff_t, Dim >  pos 
) const
virtual

Get the Array value at the given position.

When trying to access an out-of-Array position a RuntimeError is thrown.

Parameters
dataThe Array to read a value from
posThe position to read
Returns
The Array value at the passed position
Exceptions
RuntimeErrorIf the position passed is not within the Array bounds this exception is thrown

Implements atb::BoundaryTreatment< DataT, Dim >.

◆ getIndex() [1/2]

template<typename DataT, int Dim>
blitz::TinyVector<ptrdiff_t,Dim> atb::CropBoundaryTreatment< DataT, Dim >::getIndex ( blitz::TinyVector< ptrdiff_t, Dim >  pos,
blitz::TinyVector< ptrdiff_t, Dim > const &  shape 
) const
virtual

Get the in-Array-Index to the given position.

When passing an out-of-Array position a RuntimeError is thrown.

Parameters
posThe position to transform to in-Array-coordinates
shapeThe Array shape
Returns
The position passed
Exceptions
RuntimeErrorIf the position passed is not within the Array bounds this exception is thrown

Implements atb::BoundaryTreatment< DataT, Dim >.

◆ get() [2/2]

template<typename DataT, int Dim>
DataT atb::CropBoundaryTreatment< DataT, Dim >::get ( DataT const *  data,
ptrdiff_t  pos,
ptrdiff_t  length 
) const
virtual

Get the C-array value at the given position.

For out-of-array positions the corresponding treatment will be applied

Parameters
dataThe C-array to read a value from
posThe position to read
lengthThe array length
Returns
The array value at the specified position after boundary treatment

Implements atb::BoundaryTreatment< DataT, Dim >.

◆ getIndex() [2/2]

template<typename DataT, int Dim>
ptrdiff_t atb::CropBoundaryTreatment< DataT, Dim >::getIndex ( ptrdiff_t  pos,
ptrdiff_t  length 
) const
virtual

Get the in-array-index to the given position.

This function throws a RuntimeError if the BoundaryTreatment cannot return valid out-of-array indices. This can be checked using the providesIndices flag

Parameters
posThe position to transform to in-Array-coordinates
lengthThe array length
Returns
The in-Array position corresponding to the position that was passed to the function according to the used boundary treatment
Exceptions
RuntimeErrorThis exception is thrown if the BoundaryTreatment cannot generate in-Array positions from given out-of-Array positions, and an out-of-Array position is passed.

Implements atb::BoundaryTreatment< DataT, Dim >.


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