brainrat-private 6.0.4
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
17
18using namespace std;
19using namespace carto;
20using namespace aims;
21
22namespace 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
52namespace 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
ImageProcessors<AimsRGB, double> p(data, mask, "rgbm", options, ImageProcessorMode::Init); ImageProce...
Definition classes.h:25
STL namespace.