fw4spl
fwGdcmIO::helper::DicomSeriesWriter Class Reference

Write a DicomSeries in DICOM format. More...

#include <DicomSeriesWriter.hpp>

+ Inheritance diagram for fwGdcmIO::helper::DicomSeriesWriter:
+ Collaboration diagram for fwGdcmIO::helper::DicomSeriesWriter:

Public Member Functions

virtual bool isA (const std::string &type) const override
 
FWGDCMIO_API DicomSeriesWriter (::fwDataIO::writer::IObjectWriter::Key key)
 Constructor. Does nothing.
 
FWGDCMIO_API void write () override
 Write the image series in DICOM format.
 
FWGDCMIO_API std::string extension () override
 Return an empty string.
 
FWGDCMIO_API std::shared_ptr< ::fwJobs::IJobgetJob () const override
 Get job observer.
 
FWGDCMIO_API void setAnonymizer (const std::shared_ptr< helper::DicomAnonymizer > &anonymizer)
 Defines optional anonymizer.
 
FWGDCMIO_API void setOutputArchive (const std::shared_ptr< ::fwZip::IWriteArchive > &archive, const std::string &subPath="")
 Defines output archive for DICOM files. More...
 
- Public Member Functions inherited from fwDataIO::writer::GenericObjectWriter< ::fwMedData::DicomSeries >
 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 DataTypegetConcreteObject () 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.
 
- Public Member Functions inherited from fwCore::BaseObject
- Public Member Functions inherited from fwData::location::enableFolder< ::fwDataIO::writer::IObjectWriter >
 enableFolder (::fwDataIO::writer::IObjectWriter *rw)
 constructor More...
 
void setFolder (ILocation::PathType folder)
 Set folder filesystem path.
 
ILocation::PathType getFolder ()
 Get folder filesystem path.
 
void setRecursive (bool val)
 Set the flag if folder location is recursive.
 
bool getRecursive ()
 Get the flag if folder location is recursive.
 

Static Public Member Functions

static bool isTypeOf (const std::string &type)
 
- Static Public Member Functions inherited from fwDataIO::writer::GenericObjectWriter< ::fwMedData::DicomSeries >
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
 

Protected Member Functions

std::string getFilename (const size_t &instanceIndex)
 Compute DICOM filename according to anonymizer or return default filename.
 
void processStream (std::istream &inputStream, std::ostream &outputStream)
 Process inputStream to outputStream with anonymisation management.
 
void processWriteArchive ()
 Process write on archive.
 
void processWrite ()
 Process write with Standard output stream.
 
- Protected Member Functions inherited from fwDataIO::writer::IObjectWriter
FWDATAIO_API IObjectWriter ()
 Constructor. Do nothing.
 
virtual FWDATAIO_API ~IObjectWriter ()
 Destructor. Do nothing.
 

Protected Attributes

int m_writeCount
 Write count.
 
std::shared_ptr< ::fwJobs::Observerm_job
 Job observer.
 
std::shared_ptr< DicomAnonymizerm_anonymizer
 Optionnal anonymiser.
 
std::shared_ptr< ::fwZip::IWriteArchivem_archive
 Optionnal output archive.
 
std::string m_subPath
 Optional subPath (related to write archive.
 
- 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.
 

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< ::fwMedData::DicomSeries >
typedef ::fwMedData::DicomSeries 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
 

Detailed Description

Write a DicomSeries in DICOM format.

This writer optionally manages anonymisation if an instance of DicomAnonymizer is set. The output DICOM files can be exported into an archive (folder or zipped file) if output archive is set.

If the DicomSeries contains the binaries of the DICOM files, the files are extracted (or zipped). If the DicomSeries contains the paths of the DICOM files, a simple copy (or zip) is performed.

Definition at line 49 of file DicomSeriesWriter.hpp.

Member Function Documentation

void fwGdcmIO::helper::DicomSeriesWriter::setOutputArchive ( const std::shared_ptr< ::fwZip::IWriteArchive > &  archive,
const std::string &  subPath = "" 
)

Defines output archive for DICOM files.

Parameters
archiveArchive instance
subPathPath within archive where DICOM files are saved (only if an anonymizer instance is defined)

Definition at line 51 of file DicomSeriesWriter.cpp.

References m_archive, and m_subPath.


The documentation for this class was generated from the following files: