00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef DX_IO_MAP_IO_PLUGIN_OST_HH
00022 #define DX_IO_MAP_IO_PLUGIN_OST_HH
00023
00024 #include "map_io_handler.hh"
00025
00026 namespace ost { namespace io {
00027
00028 class DLLEXPORT_OST_IO DX: public ImageFormatBase
00029 {
00030 public:
00031
00032 DX(bool normalize_on_save = false);
00033
00034 bool GetNormalizeOnSave() const;
00035 void SetNormalizeOnSave(bool normalize_on_save);
00036 static String FORMAT_STRING;
00037 static String FORMAT_NAME_STRING;
00038 static String FORMAT_DESCRIPTION_STRING;
00039
00040 private:
00041
00042 bool normalize_on_save_;
00043 };
00044
00045 class DLLEXPORT_OST_IO MapIODxHandler: public MapIOHandler
00046 {
00047 public:
00056 virtual void Import(img::MapHandle& sh, const boost::filesystem::path& loc,
00057 const ImageFormatBase& formatstruct);
00058 virtual void Import(img::MapHandle& sh, std::istream& loc,const ImageFormatBase& formatstruct);
00059 virtual void Export(const img::MapHandle& sh,
00060 const boost::filesystem::path& loc,const ImageFormatBase& formatstruct) const;
00061 virtual void Export(const img::MapHandle& sh,
00062 std::ostream& loc, const ImageFormatBase& formatstruct) const;
00063 static bool MatchContent(unsigned char* header);
00064 static bool MatchType(const ImageFormatBase& type);
00065 static bool MatchSuffix(const String& locx);
00066 static bool ProvidesImport() { return true; }
00067 static bool ProvidesExport() { return true; }
00068
00069 static String GetFormatName() { return String("Dx"); };
00070 static String GetFormatDescription() { return String("Format used by the OpenDX software package"); };
00071
00072 };
00073
00074 typedef MapIOHandlerFactory<MapIODxHandler> MapIODxHandlerFactory;
00075
00076 }}
00077
00078 #endif