cartodata  5.1.2
volumeformatwriter.h
Go to the documentation of this file.
1 /* This software and supporting documentation are distributed by
2  * Institut Federatif de Recherche 49
3  * CEA/NeuroSpin, Batiment 145,
4  * 91191 Gif-sur-Yvette cedex
5  * France
6  *
7  * This software is governed by the CeCILL-B license under
8  * French law and abiding by the rules of distribution of free software.
9  * You can use, modify and/or redistribute the software under the
10  * terms of the CeCILL-B license as circulated by CEA, CNRS
11  * and INRIA at the following URL "http://www.cecill.info".
12  *
13  * As a counterpart to the access to the source code and rights to copy,
14  * modify and redistribute granted by the license, users are provided only
15  * with a limited warranty and the software's author, the holder of the
16  * economic rights, and the successive licensors have only limited
17  * liability.
18  *
19  * In this respect, the user's attention is drawn to the risks associated
20  * with loading, using, modifying and/or developing or reproducing the
21  * software by the user in light of its specific status of free software,
22  * that may mean that it is complicated to manipulate, and that also
23  * therefore means that it is reserved for developers and experienced
24  * professionals having in-depth computer knowledge. Users are therefore
25  * encouraged to load and test the software's suitability as regards their
26  * requirements in conditions enabling the security of their systems and/or
27  * data to be ensured and, more generally, to use and operate it in the
28  * same conditions as regards security.
29  *
30  * The fact that you are presently reading this means that you have had
31  * knowledge of the CeCILL-B license and that you accept its terms.
32  */
33 
34 #ifndef CARTODATA_IO_VOLUMEFORMATWRITER_H
35 #define CARTODATA_IO_VOLUMEFORMATWRITER_H
36 //--- soma io ----------------------------------------------------------------
41 //--- cartobase --------------------------------------------------------------
42 #include <cartobase/object/object.h> // using none()
43 #include <cartobase/smart/rcptr.h> // member
44 //--- system -----------------------------------------------------------------
45 #include <vector>
46 //----------------------------------------------------------------------------
47 
48 namespace carto
49 {
50  template<typename T> class Volume;
51  template<typename T> class VolumeRef;
52 }
53 
54 namespace soma
55 {
56  class DataSourceInfo;
57 
58  //==========================================================================
59  // W R I T E R O F V O L U M E
60  //==========================================================================
77  template <typename T>
78  class VolumeFormatWriter : public FormatWriter<carto::Volume<T> >
79  {
80  public:
81  virtual ~VolumeFormatWriter();
82 
85  virtual bool filterProperties(carto::Object header,
86  carto::Object options = carto::none());
87 
91  virtual bool write( const carto::Volume<T> & obj,
93  carto::Object options );
94 
97  void attach( carto::rc_ptr<ImageWriter<T> > imw );
98 
99  protected:
101  };
102 
103  //==========================================================================
104  // W R I T E R O F R E F E R E N C E T O V O L U M E
105  //==========================================================================
109  template<typename T>
111  public FormatWriter<carto::VolumeRef<T> >
112  {
113  public:
114  virtual ~VolumeRefFormatWriter();
115 
118  virtual bool filterProperties(carto::Object header,
119  carto::Object options = carto::none());
120 
124  virtual bool write( const carto::VolumeRef<T> & obj,
126  carto::Object options );
127 
130  void attach( carto::rc_ptr<ImageWriter<T> > imw );
131 
132  protected:
134  };
135 
136 }
137 #endif
Convenient handle for a Volume - this is normally the entry point for all volumes handling.
Definition: volumeref.h:60
N-D Volume main class.
Definition: volumebase.h:119
FormatWriter specialized for 4D Volume.
virtual bool filterProperties(carto::Object header, carto::Object options=carto::none())
FormatWriter derived function It removes properties that must not be written.
carto::rc_ptr< ImageWriter< T > > _imw
virtual bool write(const carto::Volume< T > &obj, carto::rc_ptr< DataSourceInfo > dsi, carto::Object options)
FormatWriter derived function This method understands a volume and calls appropriate ImageWriter meth...
void attach(carto::rc_ptr< ImageWriter< T > > imw)
Linking to a ImageWriter Allows us to declare only once the ImageWriter.
FormatWriter specialized for reference to 4D Volume.
carto::rc_ptr< ImageWriter< T > > _imw
virtual bool filterProperties(carto::Object header, carto::Object options=carto::none())
FormatWriter derived function It removes properties that must not be written.
virtual bool write(const carto::VolumeRef< T > &obj, carto::rc_ptr< DataSourceInfo > dsi, carto::Object options)
FormatWriter derived function This method understands a volume and calls appropriate ImageWriter meth...
void attach(carto::rc_ptr< ImageWriter< T > > imw)
Linking to a ImageWriter Allows us to declare only once the ImageWriter.
Object none()