OpenStructure
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
Examples
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
stage
include
ost
io
img
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
28
class
DLLEXPORT_OST_IO
DX
:
public
ImageFormatBase
29
{
30
public
:
31
32
DX
(
bool
normalize_on_save =
false
);
33
34
bool
GetNormalizeOnSave()
const
;
35
void
SetNormalizeOnSave(
bool
normalize_on_save);
36
static
String
FORMAT_STRING
;
37
static
String
FORMAT_NAME_STRING
;
38
static
String
FORMAT_DESCRIPTION_STRING
;
39
40
private
:
41
42
bool
normalize_on_save_;
43
};
44
45
class
DLLEXPORT_OST_IO
MapIODxHandler
:
public
MapIOHandler
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
74
typedef
MapIOHandlerFactory<MapIODxHandler>
MapIODxHandlerFactory
;
75
76
}}
// ns
77
78
#endif
Generated on Mon Nov 5 2012 13:31:04 for OpenStructure by
1.8.1.1