18 #ifndef PIC_IO_TMP_HPP 19 #define PIC_IO_TMP_HPP 24 #include "../base.hpp" 48 int &height,
int &channels,
int &frames,
bool bHeader =
true)
50 FILE *file = fopen(nameFile.c_str(),
"rb");
73 data =
new float[width * height * channels * frames];
83 fread(data,
sizeof(
float), frames * width * height * channels, file);
102 int &height,
int &channels,
int &frames,
bool bHeader =
true)
109 header.
width = width;
114 FILE *file = fopen(nameFile.c_str(),
"wb");
120 int size = frames * width * height * channels;
129 fwrite(data,
sizeof(
float), size, file);
int channels
Definition: tmp.hpp:32
PIC_INLINE bool WriteTMP(std::string nameFile, float *data, int &width, int &height, int &channels, int &frames, bool bHeader=true)
WriteTMP writes a dump temp file.
Definition: tmp.hpp:101
int width
Definition: tmp.hpp:32
int height
Definition: tmp.hpp:32
The TMP_IMG_HEADER struct is a header for a tmp image.
Definition: tmp.hpp:31
#define PIC_INLINE
Definition: base.hpp:33
Definition: bilateral_separation.hpp:25
PIC_INLINE float * ReadTMP(std::string nameFile, float *data, int &width, int &height, int &channels, int &frames, bool bHeader=true)
ReadTMP reads a dump temp file.
Definition: tmp.hpp:47
int frames
Definition: tmp.hpp:32