You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
827 B
53 lines
827 B
3 months ago
|
|
||
|
|
||
|
#pragma once
|
||
|
|
||
|
#ifndef _IMAGE_H_
|
||
|
#define _IMAGE_H_
|
||
|
|
||
|
#include <Eigen>
|
||
|
#include <opencv2/opencv.hpp>
|
||
|
#include <opencv2/world.hpp>
|
||
|
#include <opencv2/core/eigen.hpp>
|
||
|
|
||
|
#include "oc_array.h"
|
||
|
|
||
|
namespace opencorr
|
||
|
{
|
||
|
class Image2D
|
||
|
{
|
||
|
public:
|
||
|
int height, width;
|
||
|
std::string file_path;
|
||
|
|
||
|
cv::Mat cv_mat;
|
||
|
Eigen::MatrixXf eg_mat;
|
||
|
|
||
|
|
||
|
Image2D(int width, int height);
|
||
|
Image2D(std::string file_path);
|
||
|
~Image2D() = default;
|
||
|
|
||
|
void load(std::string file_path);
|
||
|
};
|
||
|
|
||
|
class Image3D
|
||
|
{
|
||
|
public:
|
||
|
int dim_x, dim_y, dim_z;
|
||
|
std::string file_path;
|
||
|
|
||
|
float*** vol_mat = nullptr;
|
||
|
|
||
|
Image3D(int dim_x, int dim_y, int dim_z);
|
||
|
Image3D(std::string file_path);
|
||
|
~Image3D();
|
||
|
|
||
|
void loadBin(std::string file_path);
|
||
|
void loadTiff(std::string file_path);
|
||
|
void load(std::string file_path);
|
||
|
};
|
||
|
|
||
|
}//namespace opencorr
|
||
|
|
||
|
#endif //_IMAGE_H_
|