forked from OpenMS/OpenMS
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTutorial_MapAlignment.cpp
More file actions
39 lines (29 loc) · 1.25 KB
/
Copy pathTutorial_MapAlignment.cpp
File metadata and controls
39 lines (29 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Copyright (c) 2002-present, OpenMS Inc. -- EKU Tuebingen, ETH Zurich, and FU Berlin
// SPDX-License-Identifier: BSD-3-Clause
//
#include <OpenMS/ANALYSIS/MAPMATCHING/MapAlignmentAlgorithmPoseClustering.h>
#include <OpenMS/CONCEPT/Types.h>
#include <OpenMS/FORMAT/FileHandler.h>
#include <OpenMS/openms_data_path.h> // exotic header for path to tutorial data
using namespace OpenMS;
using namespace std;
int main(int argc, const char** argv)
{
auto tutorial_data_path = OPENMS_DOC_PATH + String("/code_examples/");
FeatureMap reference;
FeatureMap toAlign;
FileHandler xml_file;
xml_file.loadFeatures(tutorial_data_path + "/data/Tutorial_MapAlignment_1.featureXML", reference);
xml_file.loadFeatures(tutorial_data_path + "/data/Tutorial_MapAlignment_2.featureXML", toAlign);
// create map alignment algorithm
MapAlignmentAlgorithmPoseClustering algorithm;
// ... set parameters
algorithm.setReference(reference);
// create object for the computed transformation
TransformationDescription transformation;
// align
algorithm.align(toAlign, transformation);
// store results
xml_file.storeFeatures("Tutorial_MapAlignment_1.featureXML", reference);
xml_file.storeFeatures("Tutorial_MapAlignment_2.featureXML", toAlign);
} // end of main