34 #ifndef AIMS_IO_AIMSGRAPHW_D_H 35 #define AIMS_IO_AIMSGRAPHW_D_H 84 std::map<std::string,AimsGraphWriter::Wrapper *>::iterator i, e
94 template<
typename T>
bool 97 return wp.write( *data );
101 template<
typename T>
int 104 typename T::const_iterator i = data->begin(), e = data->end();
106 if( i != e && i->first == 0 )
108 for ( ; i!=e && i->first==n; ++i, ++n ) {}
113 template<
typename T> std::string
116 return ::carto::DataTypeCode<T>().objectType();
120 template<
typename T> std::string
128 bool AimsGraphWriter::write(
const T & obj )
const 131 if ( d->mode == Local )
133 if ( d->saveall || ( d->modified && !obj.empty() ) )
137 == std::string::npos )
143 return w.
write( obj );
149 Wrapper *& glob = d->globalobjects[ d->elemcode.global_filename ];
154 if ( !d->elemcode.global_attribute.empty()
155 && info.graph->getProperty( d->elemcode.global_attribute,
166 if( !d->delayindex && d->mode == Global )
194 catch( std::exception & e )
196 std::cerr << e.what() << std::endl;
~AimsGraphWriter_Private()
std::map< std::string, AimsGraphWriter::Wrapper * > globalobjects
virtual std::string objectType() const
Describe how Aims objects are stored in graph objects.
The class for EcatSino data write operation.
static std::string fileStat(const std::string &)
GraphElementCode elemcode
carto::rc_ptr< std::map< std::string, std::vector< int > > > colors
static bool defaultTakeObject(Process &, const std::string &, Finder &)
virtual bool write(const T &obj, bool ascii=false, const std::string *format=0)
Finds the correct format and writes the object.
std::map< std::string, bool > globalmodified
Generic finder / checker for all data objects and file formats This will replace the old AimsFinder...
AimsGraphWriter::SavingMode prevmode
static std::string dirname(const std::string &)
AimsGraphWriter::SavingMode oldmode
AimsGraphWriter::SavingMode mode
AimsGraphWriter::SavingMode newmode
Generic writer for every format of Aims object.
virtual std::string dataType() const
AimsGraphWriter_Private()
void adjustVoxelSize(T &, const T &)
utility function to copy voxel sizes from an object to another (if applicable)
void insertElement(T &dest, int index, const T &src)
insert a sub-element in a container data (time bucket/mesh/texture, or volume of labels...)
Link mechanism between the Finder and a process operating on arbitrary data types.
carto::AttributedObject * element
void setHeaderInfo(T &obj, const carto::GenericObject &srcheader)