00001
00002
00003
00004
00005
00006
00007
00008 #pragma once
00009 #ifndef imageLoad_H
00010 #define imageLoad_H
00011 #include <iostream>
00012 #include <fstream>
00013 #include "segDTWT.h"
00014 #define ALIGN_TO_BYTES 16
00015
00016 typedef unsigned char BYTE;
00017 typedef unsigned short WORD;
00018
00019 #pragma pack(1)
00020 typedef struct{
00021 BYTE IDLength;
00022 BYTE ColorMapType;
00023 BYTE Imagetype;
00024 WORD CMapStart;
00025 WORD CMapLength;
00026 BYTE CMapDepth;
00027 WORD XOffset;
00028 WORD YOffset;
00029 WORD Width;
00030 WORD Height;
00031 BYTE PixelDepth;
00032 BYTE ImageDescriptor;
00033 } TGAheader;
00034
00035 #pragma pack()
00036
00037
00038 using namespace std;
00039
00040
00058 float* loadWrapAlignTGA(const char* name,int r, int *widthStep, Size* size);
00059
00076 int saveTGA(const char* name,float* image, int widthStep, Size size);
00077
00078
00079 void wrapBorder_sp0_32f_C1(float* o_data, int o_widthStep,int r,Size size);
00080
00081 void wrapBorder_symh_32f_C1(float* o_data, int o_widthStep,int r,Size size);
00082
00083 void wrapBorder_symw_32f_C1(float* o_data, int o_widthStep,int r,Size size);
00084
00085
00086 #endif