OpenStructure
map_io_dx_handler.hh
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
2 // This file is part of the OpenStructure project <www.openstructure.org>
3 //
4 // Copyright (C) 2008-2011 by the OpenStructure authors
5 // Copyright (C) 2003-2010 by the IPLT authors
6 //
7 //
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License as published by the Free
10 // Software Foundation; either version 3.0 of the License, or (at your option)
11 // any later version.
12 // This library is distributed in the hope that it will be useful, but WITHOUT
13 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14 // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
15 // details.
16 //
17 // You should have received a copy of the GNU Lesser General Public License
18 // along with this library; if not, write to the Free Software Foundation, Inc.,
19 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 //------------------------------------------------------------------------------
21 #ifndef DX_IO_MAP_IO_PLUGIN_OST_HH
22 #define DX_IO_MAP_IO_PLUGIN_OST_HH
23 
24 #include "map_io_handler.hh"
25 
26 namespace ost { namespace io {
27 
29 {
30  public:
31 
32  DX(bool normalize_on_save = false);
33 
34  bool GetNormalizeOnSave() const;
35  void SetNormalizeOnSave(bool normalize_on_save);
39 
40  private:
41 
42  bool normalize_on_save_;
43 };
44 
46 {
47  public:
56  virtual void Import(img::MapHandle& sh, const boost::filesystem::path& loc,
57  const ImageFormatBase& formatstruct);
58  virtual void Import(img::MapHandle& sh, std::istream& loc,const ImageFormatBase& formatstruct);
59  virtual void Export(const img::MapHandle& sh,
60  const boost::filesystem::path& loc,const ImageFormatBase& formatstruct) const;
61  virtual void Export(const img::MapHandle& sh,
62  std::ostream& loc, const ImageFormatBase& formatstruct) const;
63  static bool MatchContent(unsigned char* header);
64  static bool MatchType(const ImageFormatBase& type);
65  static bool MatchSuffix(const String& locx);
66  static String GetFormatName() { return String("Dx"); };
67  static String GetFormatDescription() { return String("Format used by the OpenDX software package"); };
68 
69 };
70 
72 
73 }} // ns
74 
75 #endif