brainrat-private
5.1.2
dpyformat_d.h
Go to the documentation of this file.
1
/* Copyright (C) 2000-2013 CEA
2
*
3
* This software and supporting documentation were developed by
4
* bioPICSEL
5
* CEA/DSV/I²BM/MIRCen/LMN, Batiment 61,
6
* 18, route du Panorama
7
* 92265 Fontenay-aux-Roses
8
* France
9
*/
10
11
#ifndef BRAINRAT_PLUGINS_BIODPY_LIB_IO_DPYFORMAT_D_H
12
#define BRAINRAT_PLUGINS_BIODPY_LIB_IO_DPYFORMAT_D_H
13
14
#include <
brainrat/io/dpyformat.h
>
15
#include <
brainrat/io/dpyreader.h
>
16
#include <
brainrat/io/dpywriter.h
>
17
18
using namespace
std;
19
using namespace
carto
;
20
using namespace
aims
;
21
22
namespace
bio
23
{
24
template
<
class
T>
25
bool
DpyFormat<T>::read(
const
string
& filename, T& thing,
const
AllocatorContext&,
26
Object options )
27
{
28
DpyReader r( filename );
29
r.read( thing, options );
30
return
true
;
31
}
32
33
template
<
class
T>
34
bool
DpyFormat<T>::write(
const
string
& filename,
35
const
T& thing,
bool
)
36
{
37
try
38
{
39
DpyWriter r( filename );
40
r.write( thing );
41
}
42
catch
( exception & e )
43
{
44
return
false
;
45
}
46
47
return
true
;
48
}
49
50
}
51
52
namespace
aims
53
{
54
template
<>
void
FileFormatDictionary<bio::DpyData >::registerBaseFormats()
55
{
56
vector<string> ext;
57
ext.push_back(
"dpy"
);
58
bio::DpyFormat<bio::DpyData>
*df =
new
bio::DpyFormat<bio::DpyData>
;
59
registerFormat(
"DPY"
, df, ext );
60
}
61
62
}
63
64
#endif
bio::DpyFormat
Definition:
dpyformat.h:25
dpyformat.h
dpyreader.h
dpywriter.h
aims
bio
ImageProcessors<AimsRGB, double> p(data, mask, "rgbm", options, ImageProcessorMode::Init); ImageProce...
Definition:
classes.h:25
carto
brainrat
io
dpyformat_d.h
Generated by
1.9.1