-
Notifications
You must be signed in to change notification settings - Fork 0
/
vol_math_ImageVolume.h
49 lines (43 loc) · 1.04 KB
/
vol_math_ImageVolume.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#ifndef IMAGEVOLUME_H
#define IMAGEVOLUME_H
#include <stdio.h>
#include <string.h>
#define IMAGE_INDEXTYPE size_t
const int PixelType_8bit = 1;
const int PixelType_16bit = 2;
const int PixelType_32bit = 3;
class ImageVolume
{
public:
void* Data;
int Width;
int Height;
int Depth;
int PixelType;
//qym 2013-12-4
bool CreateSpace;
ImageVolume(int width,int height, int depth,int pixelType=1,bool createSpace=true);
ImageVolume(int width,int height, int depth,int pixelType,void *data);
//new from filter
ImageVolume(int width,int height, int depth,int pixelType,void *data,bool createSpace );
ImageVolume();
~ImageVolume();
IMAGE_INDEXTYPE GetLength();
void ReadVolume(const char* fileName);
void SaveRaw(const char* fileName);
};
class Image2D
{
public:
void *data;
int width;
int height;
int PixelType;
Image2D();
~Image2D();
Image2D(int width,int height,int pixelType=1,bool createSpace=true);
IMAGE_INDEXTYPE GetLength();
void ReadImage(const char* fileName);
void SaveImage(const char* fileName);
};
#endif