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
60 class OPENMS_DLLAPI BrukerTimsImagingFile : public ProgressLogger
61 {
62 public:
64 struct MaldiPixel
65 {
66 Int frame_id = 0;
67 Int x = 0;
68 Int y = 0;
69 };
70
72 struct Config
73 {
77 BrukerTimsFile::Config inner_config;
78
80 bool strict_imaging_only = true;
81 };
82
84 BrukerTimsImagingFile() = default;
85
103 void load(const std::string& path, MSImagingExperiment& exp);
104
123 void load(const std::string& path, MSImagingExperiment& exp, const Config& config);
124
136 static bool isImagingDataset(const std::string& path);
137
151 static std::vector<MaldiPixel> readMaldiFrameInfo(const std::string& d_folder);
152
163 static std::string readGlobalMetadataValue(const std::string& d_folder, const std::string& key);
164
165 private:
167 static void computeBoundingBox_(const std::vector<MaldiPixel>& rows,
168 Int& x_min, Int& y_min,
169 UInt& width, UInt& height);
170
174 static std::string resolveTdfPath_(const std::string& path, std::unique_ptr<TempDir>& temp_dir);
175 };
176
177} // namespace OpenMS
178
179#endif // WITH_OPENTIMS
int Int
Signed integer type.
Definition Types.h:72
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19