OpenMS
Loading...
Searching...
No Matches
BrukerTimsImagingFile.h
Go to the documentation of this file.
1// Copyright (c) 2002-present, OpenMS Inc. -- EKU Tuebingen, ETH Zurich, and FU Berlin
2// SPDX-License-Identifier: BSD-3-Clause
3//
4// --------------------------------------------------------------------------
5// $Maintainer: Timo Sachsenberg $
6// $Authors: Timo Sachsenberg $
7// --------------------------------------------------------------------------
8
9#pragma once
10
11#include <OpenMS/config.h>
12
13#ifdef WITH_OPENTIMS
14
20
21#include <memory>
22#include <vector>
23
24namespace OpenMS
25{
26 class TempDir;
27
56 class OPENMS_DLLAPI BrukerTimsImagingFile : public ProgressLogger
57 {
58 public:
60 struct MaldiPixel
61 {
62 Int frame_id = 0;
63 Int x = 0;
64 Int y = 0;
65 };
66
68 struct Config
69 {
73 BrukerTimsFile::Config inner_config;
74
76 bool strict_imaging_only = true;
77 };
78
80 BrukerTimsImagingFile() = default;
81
99 void load(const std::string& path, MSImagingExperiment& exp);
100
119 void load(const std::string& path, MSImagingExperiment& exp, const Config& config);
120
132 static bool isImagingDataset(const std::string& path);
133
147 static std::vector<MaldiPixel> readMaldiFrameInfo(const std::string& d_folder);
148
159 static std::string readGlobalMetadataValue(const std::string& d_folder, const std::string& key);
160
161 private:
163 static void computeBoundingBox_(const std::vector<MaldiPixel>& rows,
164 Int& x_min, Int& y_min,
165 UInt& width, UInt& height);
166
169 static std::string resolveTdfPath_(const std::string& path, std::unique_ptr<TempDir>& temp_dir);
170 };
171
172} // namespace OpenMS
173
174#endif // WITH_OPENTIMS
int Int
Signed integer type.
Definition Types.h:72
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19