#include <OpenMS/ANALYSIS/MAPMATCHING/PoseClusteringAffineSuperimposer.h>
It works on two element maps (FeatureMap is the default map type, but you can also use a pointer map like DPeakConstReferenceArray) and computes a affine transformation, that maps the elements of one map (scene map) as near as possible to the elements in the other map (model map). A element can be a DPeak, a DFeature, a ConsensusPeak or ConsensusFeature (wheras DFeature is the default element type).
This superimposer hashs all possible affine transformations and defines the transformation with the most votes as the best one.
PoseClusteringAffineSuperimposer Parameters are explained on a separate page.
Public Types | |
enum | HashMap { SHIFT = 0, SCALING = 1 } |
enum | Maps { MODEL = 0, SCENE = 1 } |
typedef BaseSuperimposer< MapT > | Base |
typedef Base::QualityType | QualityType |
Intensity bounding box. | |
typedef Base::PositionType | PositionType |
Position type. | |
typedef Base::IntensityType | IntensityType |
typedef Base::PointType | PointType |
Type of elements considered here. | |
typedef Base::PointMapType | PointMapType |
Container for input elements. | |
typedef PositionType::CoordinateType | CoordinateType |
typedef DPeakConstReferenceArray < PointMapType > | PeakPointerArray |
typedef DBoundingBox< 2 > | PositionBoundingBoxType |
typedef DBoundingBox< 1 > | IntensityBoundingBoxType |
typedef LinearMapping | AffineTransformationType |
typedef std::pair< int, int > | PairType |
typedef std::map< PairType, QualityType > | AffineTransformationMapType |
Public Member Functions | |
PoseClusteringAffineSuperimposer () | |
Constructor. | |
virtual | ~PoseClusteringAffineSuperimposer () |
Destructor. | |
virtual void | run () |
Estimates the transformation for each grid cell. | |
void | setMzBucketSize (double mz_bucket_size) |
Set size of the mz tolerance of point partners. | |
double | getMzBucketSize () const |
Get size of the mz tolerance of point partners. | |
void | setShiftBucketSize (UInt dim, double shift_bucket_size) |
Set size of shift buckets (in dimension dim). | |
double | getShiftBucketSize (UInt dim) const |
Get size of shift buckets (in dimension dim). | |
void | setScalingBucketSize (UInt dim, double scaling_bucket_size) |
Set size of scaling buckets (in dimension dim). | |
double | getScalingBucketSize (UInt dim) const |
Get size of scaling buckets (in dimension dim). | |
void | setBucketWindowShift (UInt dim, UInt bucket_window_shift) |
Set number of neighbouring shift buckets to be considered for the calculation of the final transformation (in dimension dim). | |
UInt | getBucketWindowShift (UInt dim) const |
Get number of neighbouring shift buckets to be considered for the calculation of the final transformation (in dimension dim). | |
void | setBucketWindowScaling (UInt dim, UInt bucket_window_scaling) |
Set number of neighbouring scaling buckets to be considered for the calculation of the final transformation (in dimension dim). | |
UInt | getBucketWindowScaling (UInt dim) const |
Get number of neighbouring scaling buckets to be considered for the calculation of the final transformation (in dimension dim). | |
Static Public Member Functions | |
static BaseSuperimposer < PointMapType > * | create () |
Returns an instance of this class. | |
static const String | getProductName () |
Returns the name of this module. | |
Protected Member Functions | |
virtual void | updateMembers_ () |
This method is used to update extra member variables at the end of the setParam() method. | |
void | preprocess_ () |
void | hashAffineTransformations_ (IntensityType total_int_model_map, IntensityType total_int_scene_map) |
void | estimateFinalAffineTransformation_ () |
After the hashing phase, the best transformation, that is the transformation with the most votes is determined. | |
Protected Attributes | |
PeakPointerArray | model_map_red_ |
Reduced model map which contains only elements of the model map which have a partner in the scene map. | |
std::vector< std::vector < const PointType * > > | scene_map_partners_ |
Partner elements in the scene map. | |
AffineTransformationMapType | rt_hash_ |
Hash map of all transformations in the rt dimension (contains the affine transformation parameters). | |
AffineTransformationMapType | mz_hash_ |
Hash map of all transformations in the mz dimension (contains the affine transformation parameters). | |
PositionBoundingBoxType | shift_bounding_box_ |
Bounding box of the shift parameters. | |
PositionBoundingBoxType | scaling_bounding_box_ |
Bounding box of the scaling parameters. | |
PositionType | shift_bucket_size_ |
Diagonal size of each shift bucket. | |
PositionType | scaling_bucket_size_ |
Diagonal size of each scaling bucket. | |
int | num_buckets_shift_ [2] |
Number of shift buckets. | |
int | num_buckets_scaling_ [2] |
Number of scaling buckets. | |
UInt | bucket_window_shift_ [2] |
Number of neighbouring shift buckets to be considered computing the final transformations. | |
UInt | bucket_window_scaling_ [2] |
Number of neighbouring scaling buckets to be considered computing the final transformations. | |
CoordinateType | mz_bucket_size_ |
Maximum deviation in mz of two partner points. |
typedef BaseSuperimposer< MapT > Base |
typedef Base::QualityType QualityType |
Intensity bounding box.
We need this to make the intensity bounding box use the intensity type instead of the coordinate type.
Reimplemented from BaseSuperimposer.
typedef Base::PositionType PositionType |
typedef Base::IntensityType IntensityType |
Reimplemented from BaseSuperimposer.
typedef Base::PointType PointType |
typedef Base::PointMapType PointMapType |
typedef DPeakConstReferenceArray< PointMapType > PeakPointerArray |
typedef DBoundingBox<2> PositionBoundingBoxType |
typedef DBoundingBox<1> IntensityBoundingBoxType |
typedef std::pair<int,int> PairType |
typedef std::map< PairType, QualityType> AffineTransformationMapType |
enum HashMap |
enum Maps |
Symbolic names for indices of element maps etc. This should make things more understandable and maintainable.
Reimplemented from BaseSuperimposer.
PoseClusteringAffineSuperimposer | ( | ) | [inline] |
Constructor.
virtual ~PoseClusteringAffineSuperimposer | ( | ) | [inline, virtual] |
Destructor.
virtual void run | ( | ) | [inline, virtual] |
static BaseSuperimposer<PointMapType>* create | ( | ) | [inline, static] |
Returns an instance of this class.
static const String getProductName | ( | ) | [inline, static] |
Returns the name of this module.
void setMzBucketSize | ( | double | mz_bucket_size | ) | [inline] |
Set size of the mz tolerance of point partners.
double getMzBucketSize | ( | ) | const [inline] |
Get size of the mz tolerance of point partners.
void setShiftBucketSize | ( | UInt | dim, | |
double | shift_bucket_size | |||
) | [inline] |
Set size of shift buckets (in dimension dim).
double getShiftBucketSize | ( | UInt | dim | ) | const [inline] |
Get size of shift buckets (in dimension dim).
void setScalingBucketSize | ( | UInt | dim, | |
double | scaling_bucket_size | |||
) | [inline] |
Set size of scaling buckets (in dimension dim).
double getScalingBucketSize | ( | UInt | dim | ) | const [inline] |
Get size of scaling buckets (in dimension dim).
Set number of neighbouring shift buckets to be considered for the calculation of the final transformation (in dimension dim).
Get number of neighbouring shift buckets to be considered for the calculation of the final transformation (in dimension dim).
Set number of neighbouring scaling buckets to be considered for the calculation of the final transformation (in dimension dim).
Get number of neighbouring scaling buckets to be considered for the calculation of the final transformation (in dimension dim).
virtual void updateMembers_ | ( | ) | [inline, protected, virtual] |
This method is used to update extra member variables at the end of the setParam() method.
Also call it at the end of the derived classes' copy constructor and assignment operator.
The default implementation is empty.
Reimplemented from DefaultParamHandler.
void preprocess_ | ( | ) | [inline, protected] |
To speed up the calculation of the final transformation, we confine the number of considered point pairs. We match a point p in the model map only onto those points p' in the scene map that lie in a certain mz intervall. If (p_mz - mz_bucket_size_) <= p'_mz <= (p_mz mz_bucket_size_) then p and p' are partners.
NEW
NEW
TODO Remove
void hashAffineTransformations_ | ( | IntensityType | total_int_model_map, | |
IntensityType | total_int_scene_map | |||
) | [inline, protected] |
Compute the transformations between each point pair in the model map and each point pair in the scene map and hash the affine transformation.
void estimateFinalAffineTransformation_ | ( | ) | [inline, protected] |
After the hashing phase, the best transformation, that is the transformation with the most votes is determined.
PeakPointerArray model_map_red_ [protected] |
Reduced model map which contains only elements of the model map which have a partner in the scene map.
std::vector< std::vector< const PointType* > > scene_map_partners_ [protected] |
Partner elements in the scene map.
AffineTransformationMapType rt_hash_ [protected] |
Hash map of all transformations in the rt dimension (contains the affine transformation parameters).
AffineTransformationMapType mz_hash_ [protected] |
Hash map of all transformations in the mz dimension (contains the affine transformation parameters).
PositionBoundingBoxType shift_bounding_box_ [protected] |
Bounding box of the shift parameters.
PositionBoundingBoxType scaling_bounding_box_ [protected] |
Bounding box of the scaling parameters.
PositionType shift_bucket_size_ [protected] |
Diagonal size of each shift bucket.
PositionType scaling_bucket_size_ [protected] |
Diagonal size of each scaling bucket.
int num_buckets_shift_[2] [protected] |
Number of shift buckets.
int num_buckets_scaling_[2] [protected] |
Number of scaling buckets.
UInt bucket_window_shift_[2] [protected] |
Number of neighbouring shift buckets to be considered computing the final transformations.
UInt bucket_window_scaling_[2] [protected] |
Number of neighbouring scaling buckets to be considered computing the final transformations.
CoordinateType mz_bucket_size_ [protected] |
Maximum deviation in mz of two partner points.
Generated Tue Apr 1 15:36:42 2008 -- using doxygen 1.5.4 | OpenMS / TOPP 1.1 |