tttrlib
A library for time-tagged time resolved data
Loading...
Searching...
No Matches
CLSMFrame.h
Go to the documentation of this file.
1#ifndef TTTRLIB_CLSMFRAME_H
2#define TTTRLIB_CLSMFRAME_H
3
4#include <vector>
5
6#include "TTTR.h" /* TTTRRange */
7#include "CLSMPixel.h"
8#include "CLSMLine.h"
9#include "TTTRSelection.h"
10
11
13
14 friend class CLSMImage;
15
16private:
17
18 std::vector<CLSMLine*> lines;
19 TTTR* _tttr = nullptr;
20
21public:
22
31 std::vector<CLSMLine*> get_lines() {
32 return lines;
33 }
34
35
41 size_t size() final{
42 return lines.size();
43 }
44
51
58 CLSMFrame(const CLSMFrame& old_frame, bool fill = true) : TTTRSelection(old_frame) {
59 for (auto& l : old_frame.lines) {
60 lines.emplace_back(new CLSMLine(*l, fill));
61 }
62 }
63
69 virtual ~CLSMFrame() {
70 for (auto& l : lines) {
71 delete l;
72 }
73 }
74
85 explicit CLSMFrame(size_t frame_start, size_t frame_stop, TTTR* tttr);
86
92 void append(CLSMLine* line);
93
100 CLSMLine* operator[](unsigned int i_line) {
101 return lines[i_line];
102 }
103
114 for (std::size_t i = 0; i < lines.size(); ++i) {
115 *lines[i] += *rhs.lines[i];
116 }
117 return *this;
118 }
119
131 void crop(
132 int line_start, int line_stop,
133 int pixel_start, int pixel_stop
134 );
135
136
137};
138
139
140#endif //TTTRLIB_CLSMFRAME_H
Definition CLSMFrame.h:12
size_t size() final
Get the number of lines in the CLSMFrame.
Definition CLSMFrame.h:41
CLSMFrame(const CLSMFrame &old_frame, bool fill=true)
Copy constructor for CLSMFrame.
Definition CLSMFrame.h:58
void append(CLSMLine *line)
Append a CLSMLine to the current CLSMFrame.
CLSMFrame()
Default constructor for CLSMFrame.
virtual ~CLSMFrame()
Destructor for CLSMFrame.
Definition CLSMFrame.h:69
CLSMLine * operator[](unsigned int i_line)
Retrieve a pointer to the CLSMLine with the specified line number.
Definition CLSMFrame.h:100
CLSMFrame(size_t frame_start, size_t frame_stop, TTTR *tttr)
Constructor for CLSMFrame with specified frame indices and a TTTR object.
void crop(int line_start, int line_stop, int pixel_start, int pixel_stop)
Crop the CLSMFrame by selecting a region of lines and pixels.
CLSMFrame & operator+=(const CLSMFrame &rhs)
Add the corresponding CLSMLines of another CLSMFrame to the current frame.
Definition CLSMFrame.h:113
std::vector< CLSMLine * > get_lines()
Get a vector containing pointers to the CLSMLines in the CLSMFrame.
Definition CLSMFrame.h:31
Definition CLSMImage.h:161
Definition CLSMLine.h:9
Time-Tagged Time-Resolved (TTTR) data class.
Definition TTTR.h:195
Definition TTTRSelection.h:8