00001 #ifndef GLOBALDEFINES_H
00002 #define GLOBALDEFINES_H
00003
00004 #include <QString>
00005 class QObject;
00006
00007 namespace Iris {
00008
00009 #if defined (WINDOWS) || defined(WIN32) || defined (Q_WS_WIN)
00010 #define IRIS_WIN
00011 extern const char* DefaultVolumeDir;
00012 extern const char* DefaultImportDir;
00013 extern const char* IMAGE_CONVERSION_APP;
00014 #else
00015 extern const char* DefaultVolumeDir;
00016 extern const char* DefaultImportDir;
00017 extern const char* IMAGE_CONVERSION_APP;
00018 #endif
00019
00020 struct Vector3
00021 {
00022 Vector3(float x, float y, float z) { v[0] = x; v[1] = y; v[2] = z; }
00023 float operator[](int idx) { return v[idx]; }
00024 float v[3];
00025 };
00026
00027
00028
00029 #define IRIS_MAJOR_VERSION "1"
00030 #define IRIS_MINOR_VERSION "3"
00031 #define IRIS_BUILD "0"
00032 #define PERCENT_MARKER "Tool Percentage: "
00033 #define TASK_PERCENT_MARKER "Task Percentage: "
00034
00035 #define VOLUME_ID "VolumeDir:"
00036 #define SECTION_ID "SectionDir:"
00037 #define SLICE_ID "SliceDir:"
00038 #define INDEX_ID "IndexDir:"
00039 #define SECTION_FIRST_MOSAIC_ID "SectionFirstMosaic:"
00040 #define IMAGE_ID "ImageDir:"
00041 #define SLICE_IMAGE_ID "SliceImage:"
00042 #define SECTION_IMAGE_ID "SectionImage:"
00043 #define SECTION_FIRST_IMAGE_ID "SectionFirstImage:"
00044 #define SAVE_EXTENSION_FILTER "*.IrisXml"
00045 #define PIPELINE_SAVE_NAME "IrisPipeline.xml"
00046 #define MAX_RECENT_SIZE 6
00047 #define IRIS_SETTINGS_ID "Iris"
00048 #define IRIS_TEST_SETTINGS_ID "IrisTest"
00049 #define IRIS_SETTINGS_COMPANY "University of Utah, SCI Institute"
00050
00051 #ifndef NULL
00052 #define NULL 0
00053 #endif
00054
00055
00056 #ifdef IRIS_WIN
00057 #define UNREFERENCED_PARAMETER(p) (p)
00058 #else
00059 #define UNREFERENCED_PARAMETER(p)
00060 #endif
00061
00062 #define DATA_DIRECTORY "data"
00063
00064 #ifndef _itoa_s
00065 #define _itoa_s itoa
00066 #endif
00067
00068 #ifndef IRIS_WIN
00069 #define sprintf_s sprintf
00070 #endif
00071
00072 struct IrisStrings
00073 {
00074 enum Type
00075 {
00076 FILE_COPY_FAIL,
00077 MKDIR_ERROR,
00078 INVALID_SLICE_XML,
00079 INVALID_VOLUME,
00080 INVALID_TOOL,
00081 INVALID_SLICE,
00082 FILE_NOT_FOUND,
00083 DIR_NOT_FOUND,
00084 FILE_OPEN_ERROR,
00085 FILE_WRITE_ERROR,
00086 };
00087
00088 static QString Get( const QObject *object, Type type );
00089 };
00090
00091 }
00092 #endif
00093