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
52 class OPENMS_DLLAPI BrukerTimsImagingFile : public ProgressLogger
53 {
54 public:
56 struct MaldiPixel
57 {
58 Int frame_id = 0;
59 Int x = 0;
60 Int y = 0;
61 };
62
64 struct Config
65 {
69 BrukerTimsFile::Config inner_config;
70
72 bool strict_imaging_only = true;
73 };
74
76 BrukerTimsImagingFile() = default;
77
95 void load(const std::string& path, MSImagingExperiment& exp);
96
115 void load(const std::string& path, MSImagingExperiment& exp, const Config& config);
116
128 static bool isImagingDataset(const std::string& path);
129
143 static std::vector<MaldiPixel> readMaldiFrameInfo(const std::string& d_folder);
144
155 static std::string readGlobalMetadataValue(const std::string& d_folder, const std::string& key);
156
157 private:
159 static void computeBoundingBox_(const std::vector<MaldiPixel>& rows,
160 Int& x_min, Int& y_min,
161 UInt& width, UInt& height);
162
165 static std::string resolveTdfPath_(const std::string& path, std::unique_ptr<TempDir>& temp_dir);
166 };
167
168} // namespace OpenMS
169
170#endif // WITH_OPENTIMS
int Int
Signed integer type.
Definition Types.h:72
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19