7 #include "fwGdcmIO/writer/SeriesDB.hpp" 9 #include <fwCore/base.hpp> 11 #include <fwDataIO/writer/registry/macros.hpp> 13 #include <fwMedData/ModelSeries.hpp> 15 #include <boost/filesystem.hpp> 28 ::
fwData::location::enableFolder< ::
fwDataIO::writer::IObjectWriter >(this),
29 m_fiducialsExportMode(::
fwGdcmIO::writer::
Series::SPATIAL_FIDUCIALS)
47 SLM_ASSERT(
"SeriesDB not instanced", seriesDB);
49 ::fwGdcmIO::writer::Series::sptr writer = ::fwGdcmIO::writer::Series::New();
53 ::fwMedData::SeriesDB::ContainerType seriesContainer = seriesDB->getContainer();
57 for( ::fwMedData::Series::sptr series : seriesContainer)
60 const ::boost::filesystem::path& seriesPath = this->
getFolder() / series->getInstanceUID();
61 ::boost::filesystem::create_directories(seriesPath);
62 writer->setObject(series);
63 writer->setFolder(seriesPath);
68 writer->addHandler(handler);
79 return std::string(
"");
85 const ::fwMedData::Series::csptr& b)
87 ::fwMedData::ModelSeries::csptr ma = ::fwMedData::ModelSeries::dynamicCast(a);
88 ::fwMedData::ModelSeries::csptr mb = ::fwMedData::ModelSeries::dynamicCast(b);
ILocation::PathType getFolder()
Get folder filesystem path.
FWGDCMIO_API SeriesDB(::fwDataIO::writer::IObjectWriter::Key key)
Constructor.
This namespace fwDataIO contains reader and writer for several framework's data.
virtual std::shared_ptr< const DataType > getConcreteObject() const
m_object getter.
This class handles DICOM files writing. It defines needs of data storage and delegates writing to app...
FWGDCMIO_API ~SeriesDB()
Destructor.
Key class used to restrict access to Object construction. See http://www.drdobbs.com/184402053.
The namespace fwGdcmIO contains reader, writer and helper for dicom data.
::fwGdcmIO::writer::Series::FiducialsExportMode m_fiducialsExportMode
Fiducials Export Mode.
#define SLM_ASSERT(message, cond)
work like 'assert' from 'cassert', with in addition a message logged by spylog (with FATAL loglevel) ...
FWGDCMIO_API std::string extension() override
Do nothing.
static bool seriesComparator(const ::fwMedData::Series::csptr &a, const ::fwMedData::Series::csptr &b)
Function used to sort Series.
Contains the representation of the data objects used in the framework.
FWGDCMIO_API void write() override
Manage writing tools to save every series.
This class manages patient writing, in DICOM file format.