![]() |
aimsdata
5.1.2
Neuroimaging data handling
|
Generic writer for every format of Aims object. More...
#include <aims/io/writer.h>
Public Member Functions | |
Writer () | |
Writer (const std::string &filename, carto::Object options=carto::none()) | |
virtual | ~Writer () |
virtual bool | write (const T &obj, bool ascii=false, const std::string *format=0) |
Finds the correct format and writes the object. More... | |
virtual std::string | writtenObjectType () const |
virtual std::string | writtenObjectDataType () const |
virtual std::string | writtenObjectFullType () const |
![]() | |
GenericWriter () | |
GenericWriter (const std::string &filename, carto::Object options=carto::none()) | |
virtual | ~GenericWriter () |
template<typename T > | |
bool | write (const T &obj, bool ascii=false, const std::string *format=0) |
Finds the correct format and writes the object. More... | |
void | setFileName (const std::string &fileName) |
set output file name More... | |
const std::string & | fileName () const |
get output file name More... | |
const carto::Object | options () const |
void | setOptions (carto::Object opt) |
Additional Inherited Members | |
![]() | |
std::string | _filename |
carto::Object | _options |
Generic writer for every format of Aims object.
The Writer classes are built on the same model as the Reader classes and share the same FileFormatDictionary with them to store all known file formats.
|
inline |
|
inline |
|
inlinevirtual |
|
virtual |
Finds the correct format and writes the object.
If format
is specified, this format is tried first, so you can use it to force the format, otherwise it will be determined from the filename extension. If no extension and no format are given, the first working format will be used.
Definition at line 108 of file writer_d.h.
References carto::FileUtil::basename(), aims::FileFormatDictionary< T >::extensions(), aims::FileFormatDictionary< T >::fileFormat(), carto::io_error::keepExceptionPriority(), carto::io_error::launchExcept(), carto::PluginLoader::load(), carto::Object::reference(), aims::Settings::settings(), carto::Object::value(), aims::FileFormat< T >::write(), and soma::Writer< class >::write().
Referenced by TexturedData< carto::VolumeRef< T >, carto::VolumeRef< T > >::write(), TexturedData< AimsSurface< D, Void >, Texture< T > >::write(), aims::VolumeFormat< T >::write(), aims::GenericWriter::write(), and aims::write().
|
virtual |
Implements aims::GenericWriter.
Definition at line 94 of file writer_d.h.
References carto::DataTypeCode< class >::dataType().
|
virtual |
Implements aims::GenericWriter.
Definition at line 101 of file writer_d.h.
References carto::DataTypeCode< class >::name().
|
virtual |
Implements aims::GenericWriter.
Definition at line 87 of file writer_d.h.
References carto::DataTypeCode< class >::objectType().