fw4spl
|
Mesh writer. Write file format .trian. More...
#include <MeshWriter.hpp>
Public Member Functions | |
virtual bool | isA (const std::string &type) const override |
FWDATAIO_API | MeshWriter (::fwDataIO::writer::IObjectWriter::Key key) |
Constructor. Do nothing. | |
virtual FWDATAIO_API | ~MeshWriter () |
Destructor. Do nothing. | |
virtual FWDATAIO_API void | write () override |
virtual FWDATAIO_API std::string | extension () override |
Defines extension supported by this reader ".trian". | |
Public Member Functions inherited from fwDataIO::writer::GenericObjectWriter< ::fwData::Mesh > | |
GenericObjectWriter () | |
Constructor. Do nothing. | |
virtual | ~GenericObjectWriter () |
Destructor. Do nothing. | |
virtual void | setObject (::fwTools::Object::csptr obj) override |
m_object setter. More... | |
virtual std::shared_ptr< const DataType > | getConcreteObject () const |
m_object getter. More... | |
Public Member Functions inherited from fwDataIO::writer::IObjectWriter | |
virtual FWDATAIO_API void | setLocation (const ::fwData::location::ILocation::sptr location) |
m_location setter. More... | |
virtual FWDATAIO_API::fwData::location::ILocation::sptr | getLocation () |
m_location getter. More... | |
virtual FWDATAIO_API::fwTools::Object::csptr | getObject () const |
m_object getter. More... | |
virtual FWDATAIO_API void | cancel () |
Requests writer abortion. | |
virtual std::shared_ptr< ::fwJobs::IJob > | getJob () const |
Returns the internal job, nullptr by default. | |
Public Member Functions inherited from fwCore::BaseObject | |
Public Member Functions inherited from fwData::location::enableSingleFile< ::fwDataIO::writer::IObjectWriter > | |
enableSingleFile (::fwDataIO::writer::IObjectWriter *rw) | |
constructor More... | |
void | setFile (ILocation::PathType path) |
Set file system path. | |
ILocation::PathType | getFile () |
Get file system path. | |
Static Public Member Functions | |
static bool | isTypeOf (const std::string &type) |
Static Public Member Functions inherited from fwDataIO::writer::GenericObjectWriter< ::fwData::Mesh > | |
static bool | isTypeOf (const std::string &type) |
static const std::string & | classname () |
return full object's classname with its namespace, i.e. fwCore::BaseObject | |
Static Public Member Functions inherited from fwDataIO::writer::IObjectWriter | |
static bool | isTypeOf (const std::string &type) |
static const std::string & | leafClassname () |
return object's classname without its namespace, i.e. BaseObject | |
static const std::string & | classname () |
return object's classname without its namespace, i.e. BaseObject | |
Static Public Member Functions inherited from fwCore::BaseObject | |
static bool | isTypeOf (const std::string &type) |
static const std::string & | leafClassname () |
return object's classname without its namespace, i.e. BaseObject | |
static const std::string & | classname () |
return object's classname without its namespace, i.e. BaseObject | |
Friends | |
template<class , class , class > | |
class | ::fwTools::ClassFactory |
class | ::fwTools::Factory |
Demangling methods | |
virtual const std::string & | getLeafClassname () const override |
return object's classname without its namespace, i.e. BaseObject | |
virtual const std::string & | getClassname () const override |
return full object's classname with its namespace, i.e. fwCore::BaseObject | |
static const std::string & | leafClassname () |
return object's classname without its namespace, i.e. BaseObject | |
static const std::string & | classname () |
return object's classname without its namespace, i.e. BaseObject | |
Additional Inherited Members | |
Public Types inherited from fwDataIO::writer::GenericObjectWriter< ::fwData::Mesh > | |
typedef ::fwData::Mesh | DataType |
the object type related | |
Public Types inherited from fwDataIO::writer::IObjectWriter | |
typedef std::function< void(std::uint64_t) > | ProgressCallback |
typedef std::function< void() > | CancelCallback |
typedef ::fwDataIO::writer::factory::Key | Key |
Protected Member Functions inherited from fwDataIO::writer::IObjectWriter | |
FWDATAIO_API | IObjectWriter () |
Constructor. Do nothing. | |
virtual FWDATAIO_API | ~IObjectWriter () |
Destructor. Do nothing. | |
Protected Attributes inherited from fwDataIO::writer::IObjectWriter | |
::fwTools::Object::cwptr | m_object |
Object write on filesystem by the process. More... | |
::fwData::location::ILocation::sptr | m_location |
Object location ( file path, directory path, url, etc ) | |
std::string | m_extension |
Extension of file format. | |
Mesh writer. Write file format .trian.
Ircad writer to write a fwData::Mesh (with only triangular cells) on filesystem which the file format is .trian. This format is basic. This is an ascii file which contains : 1) nb of points 2) list of points (x,y,z). Line numbers represent index of point in vector 3) nb of triangles 4) list of triangles with index of points and normals ( often set a -1 )
Definition at line 35 of file core/fwDataIO/include/fwDataIO/writer/MeshWriter.hpp.
|
overridevirtual |
Write the file with standard iostream API.
Implements fwDataIO::writer::IObjectWriter.
Definition at line 41 of file core/fwDataIO/src/fwDataIO/writer/MeshWriter.cpp.
References fwDataTools::helper::Array::begin(), fwDataIO::writer::GenericObjectWriter< ::fwData::Mesh >::getConcreteObject(), fwData::location::enableSingleFile< ::fwDataIO::writer::IObjectWriter >::getFile(), fwDataTools::helper::MeshGetter::getPoints(), fwDataTools::Mesh::hasUniqueCellType(), OSLM_ERROR, OSLM_INFO, and SLM_ASSERT.