![]() |
aimsdata
5.0.5
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 |
Definition at line 99 of file writer.h.
References aims::GenericWriter::write(), aims::GenericWriter::writtenObjectDataType(), aims::GenericWriter::writtenObjectFullType(), and aims::GenericWriter::writtenObjectType().
|
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 aims::GenericWriter::_filename, aims::GenericWriter::_options, carto::FileUtil::basename(), aims::FileFormatDictionary< T >::extensions(), aims::FileFormatDictionary< T >::fileFormat(), const_ref< GenericObject >::isNull(), carto::io_error::keepExceptionPriority(), carto::io_error::launchExcept(), carto::PluginLoader::load(), aims::GenericWriter::options(), carto::Object::reference(), aims::Settings::settings(), carto::Object::value(), soma::Writer< T >::write(), and aims::FileFormat< T >::write().
Referenced by aims::AimsGraphWriter::ObjectWrapper< T >::dataType(), aims::operator<<(), aims::WavefrontMeshWriter< D, T >::removeExtension(), aims::VolumeFormat< T >::write(), aims::GenericWriter::write(), TexturedData< AimsData< T >, AimsData< T > >::write(), and TexturedData< AimsSurface< D, Void >, Texture< T > >::write().
|
virtual |
Implements aims::GenericWriter.
Definition at line 94 of file writer_d.h.
|
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.