Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

qgar::Mask1dGaussD2 Class Reference
[Masks]

#include <qgarlib/Mask1dGaussD2.H>

Inheritance diagram for qgar::Mask1dGaussD2:

qgar::GenMask1d< double > List of all members.

Detailed Description

Second derivative of a 1D Gaussian mask.

The code implementing this class is an adaptation of code written by Carsten Steger at TU Muenchen, Germany. Here is the copyright notice from his code:

 +----------------------------------------------------------------------+
 | Copyright (C) 1996 Carsten Steger                                    |
 |                                                                      |
 | This program is free software; you can redistribute it and/or modify |
 | it under the terms of the GNU General Public License as published by |
 | the Free Software Foundation; either version 2, or (at your option)  |
 | any later version.                                                   |
 |                                                                      |
 | This program is distributed in the hope that it will be useful, but  |
 | WITHOUT ANY WARRANTY; without even the implied warranty of           |
 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU    |
 | General Public License for more details.                             |
 |                                                                      |
 | You should have received a copy of the GNU General Public License    |
 | along with this program; if not, write to the Free Software          |
 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.            |
 +----------------------------------------------------------------------+

Author:
Karl Tombre
Date:
July 03, 2001 10:27
Since:
Qgar 1.0

Definition at line 88 of file Mask1dGaussD2.H.

Public Types

typedef double value_type
 Type of the mask coefficients.
typedef value_typereference
 Reference to qgar::GenMask1d::value_type.
typedef const value_typeconst_reference
 Constant reference to qgar::GenMask1d::value_type.
typedef value_typepointer
 Pointer to qgar::GenMask1d::value_type.
typedef const value_typeconst_pointer
 Constant pointer to qgar::GenMask1d::value_type.

Public Member Functions

 GenMask1d ()
 Default constructor: Set 0 to mask width, to pointer to the coefficient map, and to reference counter.
 GenMask1d (const GenMask1d< value_type > &aMask)
 Copy constructor.
 GenMask1d (const GenMask1d< U > &aMask)
 Conversion from another mask.
 GenMask1d (unsigned int aWidth, value_type aValue=static_cast< value_type >(0))
 Initialize with given width and value.
 GenMask1d (unsigned int aWidth, const_pointer const pVals)
 Create a mask from an array of values.
int width () const
 Get mask width.
value_type coeff (int anIdx) const
 Get a coefficient value.
pointer pCoeffMap () const
 Get the pointer to the coefficient map.
void setCoeff (int anIdx, value_type aCoeff)
 Set coefficient at given index.
GenMask1d< double > * shallowCopy ()
 Shallow copy: The coefficient map of the source mask is not duplicated.
CONSTRUCTORS
 Mask1dGaussD2 (const Mask1dGaussD2 &aMask)
 Copy constructor.
 Mask1dGaussD2 (double aSigma=1.0)
 Initialize from given sigma (default 1.0).
DESTRUCTOR
virtual ~Mask1dGaussD2 ()
 Virtual destructor.
OPERATORS
Mask1dGaussD2operator= (const Mask1dGaussD2 &aMask)
 Assignment.

Protected Member Functions

 GenMask1d (const GenMask1d &rhs, int)
 Disguised copy constructor sharing value array between the passed and the created instance.

Protected Attributes

int * _pRefCnt
 Reference counter.
int _width
 Mask width.
pointer _pCoeffMap
 Pointer to the memory space of the mask.


Member Typedef Documentation

typedef const value_type* qgar::GenMask1d< double >::const_pointer [inherited]
 

Constant pointer to qgar::GenMask1d::value_type.

Definition at line 93 of file GenMask1d.H.

typedef const value_type& qgar::GenMask1d< double >::const_reference [inherited]
 

Constant reference to qgar::GenMask1d::value_type.

Definition at line 83 of file GenMask1d.H.

typedef value_type* qgar::GenMask1d< double >::pointer [inherited]
 

Pointer to qgar::GenMask1d::value_type.

Definition at line 88 of file GenMask1d.H.

typedef value_type& qgar::GenMask1d< double >::reference [inherited]
 

Reference to qgar::GenMask1d::value_type.

Definition at line 78 of file GenMask1d.H.

typedef double qgar::GenMask1d< double >::value_type [inherited]
 

Type of the mask coefficients.

Definition at line 73 of file GenMask1d.H.


Constructor & Destructor Documentation

qgar::Mask1dGaussD2::Mask1dGaussD2 const Mask1dGaussD2 aMask  ) 
 

Copy constructor.

See also qgar::Mask1dGaussD2::operator=, qgar::GenMask1d::deepCopy, and qgar::GenMask1d::shallowCopy.

Warning:
Perform a deep copy: The coefficent map of the source mask is duplicated.

Definition at line 103 of file Mask1dGaussD2.C.

qgar::Mask1dGaussD2::Mask1dGaussD2 double  aSigma = 1.0  ) 
 

Initialize from given sigma (default 1.0).

Parameters:
aSigma sigma of the Gaussian

Definition at line 110 of file Mask1dGaussD2.C.

References qgar::GenMask1d< double >::_pCoeffMap, qgar::GenMask1d< double >::_width, and qgar::MASK1DGAUSSD2_phi2().

qgar::Mask1dGaussD2::~Mask1dGaussD2  )  [virtual]
 

Virtual destructor.

Definition at line 136 of file Mask1dGaussD2.C.


Member Function Documentation

value_type qgar::GenMask1d< double >::coeff int  anIdx  )  const [inherited]
 

Get a coefficient value.

Parameters:
anIdx index of the coefficient in the coefficient map

qgar::GenMask1d< double >::GenMask1d const GenMask1d< double > &  rhs,
int 
[protected, inherited]
 

Disguised copy constructor sharing value array between the passed and the created instance.

This constructor declares an unused int parameter to avoid ambiguous call between it and the copy constructor. It builds a shallow copy of a mask instance.

Parameters:
rhs A mask instance to create a copy from

qgar::GenMask1d< double >::GenMask1d unsigned int  aWidth,
const_pointer const   pVals
[inherited]
 

Create a mask from an array of values.

The passed array is duplicated using a raw memcopy.

Parameters:
aWidth The width of the array
pVals A pointer to the values.

qgar::GenMask1d< double >::GenMask1d unsigned int  aWidth,
value_type  aValue = static_cast<value_type>(0)
[inherited]
 

Initialize with given width and value.

Parameters:
aWidth mask width
aValue value to fill the mask with (default 0)
All the coefficients are set to the given value.

qgar::GenMask1d< double >::GenMask1d const GenMask1d< U > &  aMask  )  [explicit, inherited]
 

Conversion from another mask.

See also qgar::GenMask1d::operator=, qgar::GenMask1d::shallowCopy.

Warning:
Perform a deep copy: The coefficent map of the source mask is duplicated.

qgar::GenMask1d< double >::GenMask1d const GenMask1d< value_type > &  aMask  )  [inherited]
 

Copy constructor.

See also qgar::GenMask1d::operator=, qgar::GenMask1d::deepCopy, and qgar::GenMask1d::shallowCopy.

Warning:
Perform a deep copy: The coefficent map of the source mask is duplicated.

qgar::GenMask1d< double >::GenMask1d  )  [inherited]
 

Default constructor: Set 0 to mask width, to pointer to the coefficient map, and to reference counter.

Mask1dGaussD2 & qgar::Mask1dGaussD2::operator= const Mask1dGaussD2 aMask  ) 
 

Assignment.

Parameters:
aMask mask to assign
See also qgar::Mask1dGaussD2(Mask1dGaussD2&), qgar::GenMask1d::deepCopy, and qgar::GenMask1d::shallowCopy.

Warning:
Perform a deep copy: The coefficient map of the source mask is duplicated. Before the copy is performed, the destination mask is not supposed to have the same size as the destination mask.

Definition at line 147 of file Mask1dGaussD2.C.

References qgar::GenMask1d< double >::operator=().

pointer qgar::GenMask1d< double >::pCoeffMap  )  const [inline, inherited]
 

Get the pointer to the coefficient map.

void qgar::GenMask1d< double >::setCoeff int  anIdx,
value_type  aCoeff
[inherited]
 

Set coefficient at given index.

Parameters:
anIdx index in the coefficient map
aCoeff coefficient value

GenMask1d<double >* qgar::GenMask1d< double >::shallowCopy  )  [inherited]
 

Shallow copy: The coefficient map of the source mask is not duplicated.

See also qgar::GenMask1d(Genmask1d<t>&), qgar::GenMask1d::operator=,

Warning:
Before the copy is performed, the destination mask is not supposed to have the same dimensions as the source mask. When the copy is completed, the pixel map of the destination mask is the same memory space as the pixel map of the source mask.

int qgar::GenMask1d< double >::width  )  const [inline, inherited]
 

Get mask width.


Member Data Documentation

pointer qgar::GenMask1d< double >::_pCoeffMap [protected, inherited]
 

Pointer to the memory space of the mask.

Definition at line 313 of file GenMask1d.H.

Referenced by qgar::Mask1dGauss::Mask1dGauss(), and Mask1dGaussD2().

int* qgar::GenMask1d< double >::_pRefCnt [protected, inherited]
 

Reference counter.

Its value represent the number of other masks with which the current mask shares its coefficient map.

Definition at line 303 of file GenMask1d.H.

int qgar::GenMask1d< double >::_width [protected, inherited]
 

Mask width.

Definition at line 308 of file GenMask1d.H.

Referenced by qgar::Mask1dGauss::Mask1dGauss(), and Mask1dGaussD2().


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