fw4spl
|
Base class for all object readers. More...
#include <IObjectReader.hpp>
Classes | |
class | Registrar |
Class used to register a class factory in factory registry. This class defines also the object factory ( 'create' ) More... | |
Public Types | |
typedef std::function< void(std::uint64_t) > | ProgressCallback |
typedef std::function< void() > | CancelCallback |
typedef ::fwDataIO::reader::factory::Key | Key |
Public Member Functions | |
virtual bool | isA (const std::string &type) const override |
virtual FWDATAIO_API void | read ()=0 |
Defines an reader interface. More... | |
virtual FWDATAIO_API void | setObject (::fwTools::Object::sptr _pObject) |
m_object setter. More... | |
virtual FWDATAIO_API::fwTools::Object::sptr | getObject () |
m_object getter. More... | |
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 std::string | extension ()=0 |
FWDATAIO_API void | cancel () |
Requests reader abortion. | |
virtual FWDATAIO_API std::shared_ptr< ::fwJobs::IJob > | getJob () const |
Returns the internal job. | |
Public Member Functions inherited from fwCore::BaseObject |
Static Public Member Functions | |
static bool | isTypeOf (const std::string &type) |
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 | |
Protected Member Functions | |
FWDATAIO_API | IObjectReader () |
Constructor. Do nothing. | |
virtual FWDATAIO_API | ~IObjectReader () |
Destructor. Do nothing. | |
Protected Attributes | |
::fwTools::Object::wptr | m_object |
Object result of reading process. More... | |
::fwData::location::ILocation::sptr | m_location |
Object location ( file path, directory path, url, etc ) | |
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 | |
Base class for all object readers.
This class defines the API to use basic object readers. This reader is not service. Their equivalent exist as services see fwIO::IReader. To read an object with this class, use setLocation and setOject method before execute the method read. Reading modify the object given in parameter with the method setOject.
Definition at line 41 of file core/fwDataIO/include/fwDataIO/reader/IObjectReader.hpp.
|
virtual |
m_location getter.
Definition at line 54 of file core/fwDataIO/src/fwDataIO/reader/IObjectReader.cpp.
References m_location.
|
virtual |
m_object getter.
Definition at line 38 of file core/fwDataIO/src/fwDataIO/reader/IObjectReader.cpp.
References m_object, and SLM_ASSERT.
Referenced by fwDataIO::reader::GenericObjectReader< ::fwData::Tag >::getConcreteObject().
|
pure virtual |
Defines an reader interface.
This method (re)init the object given in parameter of setObject method.
Implemented in vtkGdcmIO::SeriesDBLazyReader, fwDcmtkIO::SeriesDBReader, fwGdcmIO::reader::SeriesDB, fwDataIO::reader::DictionaryReader, fwDataIO::reader::MeshReader, fwVtkIO::BitmapImageReader, fwVtkIO::MetaImageReader, fwVtkIO::SeriesDBReader, fwVtkIO::VtiImageReader, vtkGdcmIO::SeriesDBReader, fwVtkIO::MeshReader, fwDataIO::reader::TagReader, fwVtkIO::ImageReader, fwDataIO::reader::GzBufferImageReader, fwDataIO::reader::TransformationMatrix3DReader, fwDataIO::reader::GzArrayReader, fwDataIO::reader::ArrayReader, and fwItkIO::ImageReader.
|
virtual |
m_location setter.
[in] | _location | set location where object will be read |
Definition at line 47 of file core/fwDataIO/src/fwDataIO/reader/IObjectReader.cpp.
References m_location.
|
virtual |
m_object setter.
[out] | _pObject | replace weakptr m_object of the instance reader |
Reimplemented in fwDataIO::reader::GenericObjectReader< DATATYPE >, fwDataIO::reader::GenericObjectReader< ::fwData::Mesh >, fwDataIO::reader::GenericObjectReader< ::fwMedData::SeriesDB >, fwDataIO::reader::GenericObjectReader< ::fwData::StructureTraitsDictionary >, fwDataIO::reader::GenericObjectReader< ::fwData::TransformationMatrix3D >, fwDataIO::reader::GenericObjectReader< ::fwData::Array >, fwDataIO::reader::GenericObjectReader< ::fwData::Image >, and fwDataIO::reader::GenericObjectReader< ::fwData::Tag >.
Definition at line 31 of file core/fwDataIO/src/fwDataIO/reader/IObjectReader.cpp.
References m_object.
|
protected |
Object result of reading process.
This object is given in parameter of setObject method but it is conserved with a weakptr.
Definition at line 131 of file core/fwDataIO/include/fwDataIO/reader/IObjectReader.hpp.
Referenced by getObject(), fwVtkIO::ImageReader::read(), fwVtkIO::MeshReader::read(), fwVtkIO::BitmapImageReader::read(), fwVtkIO::VtiImageReader::read(), fwVtkIO::MetaImageReader::read(), fwDataIO::reader::GenericObjectReader< ::fwData::Tag >::setObject(), and setObject().