1 Star 0 Fork 1

姚瑶瑶/TIFFImageSplitter

forked from ctguhzy/TIFFImageSplitter 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
GeoTiffImage.hxx 2.63 KB
一键复制 编辑 原始数据 按行查看 历史
ctguhzy 提交于 2020-10-15 11:34 +08:00 . First Add Source Codes.
#ifndef _GEO_TIFF_IMAGE_HXX_
#define _GEO_TIFF_IMAGE_HXX_
#include <opencv/cv.h>
class GeoTiffImage
{
public:
GeoTiffImage();
~GeoTiffImage();
inline void setWidth(unsigned int width) { _imageWidth = width; }
inline void setHeight(unsigned int height) { _imageHeight = height; }
inline void setTileWidth(unsigned int tileWidth) { _tileWidth = tileWidth; }
inline void setTileHeight(unsigned int tileHeight) { _tileHeight = tileHeight; }
inline void setTileSize(unsigned int tileSize) { _tileSize = tileSize; }
inline void setTiled(bool tiled) { _tiled = tiled; }
inline void setChannels(unsigned int channels) { _channels = channels; }
inline void setDepth(unsigned int depth) { _depth = depth; }
inline unsigned int getWidth() { return _imageWidth; }
inline unsigned int getHeight() { return _imageHeight; }
inline unsigned int getTileWidth() { return _tileWidth; }
inline unsigned int getTileHeight() { return _tileHeight; }
inline unsigned int getTileSize() { return _tileSize; }
inline bool isTiled() { return _tiled; }
inline unsigned int getChannels() { return _channels; }
inline unsigned int getDepth() { return _depth; }
inline unsigned char* getImageData() { return _imageData; }
inline void setGeoScale(const double sx, const double sy, const double sz) { _geoScale[0] = sx; _geoScale[1] = sy; _geoScale[2] = sz; }
inline void setGeoControlPoint(double* controlPoint) { for (int i = 0; i < 6; i++) _geoControlPoint[i] = controlPoint[i]; }
inline void getGeoScale(double &sx, double& sy, double& sz) { sx = _geoScale[0]; sy = _geoScale[1]; sz = _geoScale[2]; }
inline void getGeoGridCoord(double& gx, double& gy, double& gz) { gx = _geoControlPoint[0]; gy = _geoControlPoint[1]; gz = _geoControlPoint[2]; }
inline void getGeoModelCoord(double& gx, double& gy, double& gz) { gx = _geoControlPoint[3]; gy = _geoControlPoint[4]; gz = _geoControlPoint[5]; }
IplImage* convert2IplImage();
void splitImage(const char* imageDirectory);
void refreshDataSpace();
inline void setMinValue(float val) { _minValue = val; }
inline void setMaxValue(float val) { _maxValue = val; }
inline float getMinValue() { return _minValue; }
inline float getMaxValue() { return _maxValue; }
void resizeTo(GeoTiffImage* target, int width, int height);
private:
unsigned int _imageWidth;
unsigned int _imageHeight;
bool _tiled;
unsigned int _tileWidth;
unsigned int _tileHeight;
unsigned int _tileSize;
unsigned int _channels;
unsigned int _depth;
unsigned char* _imageData;
double _geoScale[3];
double _geoControlPoint[6];
float _minValue;
float _maxValue;
};
#endif
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/yao-yu1999/TIFFImageSplitter.git
git@gitee.com:yao-yu1999/TIFFImageSplitter.git
yao-yu1999
TIFFImageSplitter
TIFFImageSplitter
master

搜索帮助