00001 #ifndef __PROJECTIONMGR_H__
00002 #define __PROJECTIONMGR_H__
00003
00004
00005
00006
00007
00008
00009 #ifdef _WIN32
00010 #include <windows.h>
00011 #else
00012 #error Platform not supported
00013 #endif
00014
00015 #include "configure.h"
00016 #include "resourcemgr.h"
00017 #include "prjmgrfuncs.h"
00018 #include "filelist.h"
00019 #include "handle.h"
00020 #include "imagerw.h"
00021 #include "progress.h"
00022
00023
00024 #ifdef _WIN32
00025
00026 typedef struct tagDeviceContext
00027 {
00028 HDC hMemoryDC;
00029 HBITMAP hBitmap;
00030 HGDIOBJ hOldObject;
00031 }
00032 DeviceContext;
00033
00034 #endif
00035
00036
00037
00038
00039
00040 typedef struct tagProjectionCube
00041 {
00042 vPIXEL_CODE_TYPE pixelCode;
00043 DeviceContext X;
00044 DeviceContext Y;
00045 DeviceContext Z;
00046 vSIZE dimensions[ 3 ];
00047 void *pixelsX;
00048 void *pixelsY;
00049 void *pixelsZ;
00050 }
00051 ProjectionCube;
00052
00053
00054 typedef vHANDLE vHPROJCUBE;
00055
00056
00057
00058
00059 #define vHPROJCUBE_PIXEL_CODE vPIXEL_CODE_RGB_UCHAR
00060
00061
00062 typedef enum
00063 {
00064 vPROJ_NO_ERROR,
00065 vPROJ_ERROR_OUT_OF_MEMORY,
00066 vPROJ_ERROR_MISMATCH_PIXELS,
00067 vPROJ_ERROR_MISMATCH_DIMENSIONS,
00068 vPROJ_ERROR_MULTIPLE_FILE_TYPES,
00069 vPROJ_ERROR_FILE_OPEN,
00070 vPROJ_ERROR_FILE_READ,
00071 vPROJ_ERROR_FILE_WRITE,
00072 vPROJ_ERROR_FILE_INVALID,
00073 vPROJ_ERROR_FILE_TYPE,
00074 vPROJ_ERROR_UNSUPPORTED,
00075 vPROJ_ERROR_PROJ_FUNCTION,
00076 vPROJ_ERROR_HANDLE,
00077 vPROJ_ERROR_MULTIPLE_2D_3D,
00078
00079 vPROJ_ERROR_SENTINEL
00080 }
00081 vPROJ_ERROR_CODE;
00082
00083
00084 #define vPROJ_PROGRESS_CANCEL vPROJ_ERROR_SENTINEL
00085
00086
00087 typedef ResourceManager ProjectionManager;
00088
00089
00090
00091
00092
00093 ProjectionManager* CreateProjectionManager( vUINT numProjections );
00094
00095 vVOID DestroyProjectionManager( ProjectionManager **manager );
00096
00097
00098 ProjectionCube* GetProjectionCube( ProjectionManager *manager, vHPROJCUBE hCube );
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123 DERIVE_PROGRESSPROCARGS( CREATEPROJCUBEARGS,
00124 vUINT hwndVisual;
00125 ProjectionManager *manager;
00126 FileList *fileList;
00127 vSTRING projDirectory;
00128 vSTRING projFileX;
00129 vSTRING projFileY;
00130 vSTRING projFileZ;
00131 vFILE_TYPE projFileType;
00132 vHPROJCUBE *hCube;
00133 const ImageDescriptor *descriptor;
00134 );
00135
00136 vVOID CreateProjectionCube
00137 (
00138 vVOID *createProjCubeArgs
00139 );
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155 vHPROJCUBE ReadProjectionCube
00156 (
00157 vUINT hwndVisual,
00158 ProjectionManager *manager,
00159 vSTRING fileX,
00160 vSTRING fileY,
00161 vSTRING fileZ,
00162 vPROJ_ERROR_CODE *errorCode
00163 );
00164
00165
00166 #endif
00167