OpenStructure
Loading...
Searching...
No Matches
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-2020 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
26namespace 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 bool ProvidesImport() { return true; }
67 static bool ProvidesExport() { return true; }
68
69 static String GetFormatName() { return String("Dx"); };
70 static String GetFormatDescription() { return String("Format used by the OpenDX software package"); };
71
72};
73
75
76}} // ns
77
78#endif
Manage shared instances of images.
bool GetNormalizeOnSave() const
void SetNormalizeOnSave(bool normalize_on_save)
static String FORMAT_DESCRIPTION_STRING
DX(bool normalize_on_save=false)
static String FORMAT_NAME_STRING
static String FORMAT_STRING
static bool MatchType(const ImageFormatBase &type)
virtual void Export(const img::MapHandle &sh, const boost::filesystem::path &loc, const ImageFormatBase &formatstruct) const
virtual void Import(img::MapHandle &sh, std::istream &loc, const ImageFormatBase &formatstruct)
static bool MatchSuffix(const String &locx)
static bool MatchContent(unsigned char *header)
virtual void Export(const img::MapHandle &sh, std::ostream &loc, const ImageFormatBase &formatstruct) const
static String GetFormatDescription()
virtual void Import(img::MapHandle &sh, const boost::filesystem::path &loc, const ImageFormatBase &formatstruct)
Map IO handler to read/write APBS map files (in OpenDX format)
#define DLLEXPORT_OST_IO
std::string String
Definition base.hh:54
MapIOHandlerFactory< MapIODxHandler > MapIODxHandlerFactory
Definition base.dox:1