bioprocessing  5.0.5
parameterizeddata.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1999-2001 CEA
3  *
4  * This software and supporting documentation were developed by
5  * CEA/DSV/SHFJ
6  * 4 place du General Leclerc
7  * 91401 Orsay cedex
8  * France
9  *
10  */
11 
12 #ifndef BIOPROCESSING_DATA_PARAMETERIZEDDATA_H
13 #define BIOPROCESSING_DATA_PARAMETERIZEDDATA_H
14 
15 #include <cartobase/object/syntax.h> // SyntaxSet
16 #include <soma-io/io/formatdictionary_d.h> // soma::FormatDictionary
17 #include <aims/io/fileFormat.h> // aims::FileFormat, aims::FileFormatDictionary
18 #include <aims/data/data.h>
19 #include <string>
20 #include <vector>
21 
22 template <class VoxelType>
23 class ParameterizedAimsData : public AimsData<VoxelType> {
24 
25  public :
26 
28  ParameterizedAimsData( const AimsData<VoxelType>& other );
29  ParameterizedAimsData(AimsData<VoxelType> & other);
30  ParameterizedAimsData( const std::vector<std::string> & columns,
31  const int dimX = 1,
32  const int dimY = 1,
33  const int dimZ = 1 );
34  const std::vector<std::string> columnnames() const;
35  int indexof(const std::string & columnname) const;
36  typename AimsData<VoxelType>::reference operator () (std::string columnname,
37  typename AimsData<VoxelType>::size_type x = 0,
38  typename AimsData<VoxelType>::size_type y = 0,
39  typename AimsData<VoxelType>::size_type z = 0);
40  typename AimsData<VoxelType>::const_reference operator () (std::string columnname,
41  typename AimsData<VoxelType>::size_type x = 0,
42  typename AimsData<VoxelType>::size_type y = 0,
43  typename AimsData<VoxelType>::size_type z = 0) const;
44  AimsData<VoxelType> & operator = ( const VoxelType & v );
45  typename AimsData<VoxelType>::reference operator () ( typename AimsData<VoxelType>::size_type x,
46  typename AimsData<VoxelType>::size_type y,
47  typename AimsData<VoxelType>::size_type z,
48  typename AimsData<VoxelType>::size_type t );
49  typename AimsData<VoxelType>::const_reference
50  operator () ( typename AimsData<VoxelType>::size_type x,
51  typename AimsData<VoxelType>::size_type y,
52  typename AimsData<VoxelType>::size_type z,
53  typename AimsData<VoxelType>::size_type t ) const;
54 
55 };
56 
57 namespace aims {
58  template<class VoxelType>
59  class ParameterizedGisFormat : public FileFormat<ParameterizedAimsData<VoxelType> >
60  {
61  public:
62  virtual ~ParameterizedGisFormat();
63  virtual carto::SyntaxSet getSyntaxSet();
64  virtual bool read( const std::string & filename, ParameterizedAimsData<VoxelType> & vol,
65  const carto::AllocatorContext & context,
66  carto::Object options = carto::none() );
67  virtual bool write( const std::string & filename, const ParameterizedAimsData<VoxelType> & vol,
68  carto::Object options = carto::none() );
69  };
70 
71  template<> void
72  FileFormatDictionary<ParameterizedAimsData<double> >::registerBaseFormats();
73 
74 }
75 
76 #endif
const std::vector< std::string > columnnames() const
AimsData< VoxelType > & operator=(const VoxelType &v)
AimsData< VoxelType >::reference operator()(std::string columnname, typename AimsData< VoxelType >::size_type x=0, typename AimsData< VoxelType >::size_type y=0, typename AimsData< VoxelType >::size_type z=0)
int indexof(const std::string &columnname) const