fw4spl
core/fwDicomTools/src/fwDicomTools/Series.cpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2009-2018.
3  * Distributed under the terms of the GNU Lesser General Public License (LGPL) as
4  * published by the Free Software Foundation.
5  * ****** END LICENSE BLOCK ****** */
6 
7 #include "fwDicomTools/Series.hpp"
8 
9 #include <fwMedData/DicomSeries.hpp>
10 #include <fwMedData/ImageSeries.hpp>
11 #include <fwMedData/ModelSeries.hpp>
12 
13 namespace fwDicomTools
14 {
15 
16 // ----------------------------------------------------------------------------
17 
18 ::fwMedData::ImageSeries::sptr Series::convertToImageSeries(const ::fwMedData::DicomSeries::csptr& series)
19 {
20  ::fwMedData::ImageSeries::sptr result = ::fwMedData::ImageSeries::New();
21  result->setPatient(series->getPatient());
22  result->setStudy(series->getStudy());
23  result->setEquipment(series->getEquipment());
24  result->setInstanceUID(series->getInstanceUID());
25  result->setModality(series->getModality());
26  result->setDate(series->getDate());
27  result->setTime(series->getTime());
28  result->setDescription(series->getDescription());
29  result->setPerformingPhysiciansName(series->getPerformingPhysiciansName());
30  return result;
31 }
32 
33 // ----------------------------------------------------------------------------
34 
35 ::fwMedData::ModelSeries::sptr Series::convertToModelSeries(const ::fwMedData::DicomSeries::csptr& series)
36 {
37  ::fwMedData::ModelSeries::sptr result = ::fwMedData::ModelSeries::New();
38  result->setPatient(series->getPatient());
39  result->setStudy(series->getStudy());
40  result->setEquipment(series->getEquipment());
41  result->setInstanceUID(series->getInstanceUID());
42  result->setModality(series->getModality());
43  result->setDate(series->getDate());
44  result->setTime(series->getTime());
45  result->setDescription(series->getDescription());
46  result->setPerformingPhysiciansName(series->getPerformingPhysiciansName());
47  return result;
48 }
49 
50 // ----------------------------------------------------------------------------
51 
52 } //fwDicomTools
static FWDICOMTOOLS_API std::shared_ptr< ::fwMedData::ImageSeries > convertToImageSeries(const std::shared_ptr< const ::fwMedData::DicomSeries > &series)
Convert a DicomSeries to an ImageSeries.
static FWDICOMTOOLS_API std::shared_ptr< ::fwMedData::ModelSeries > convertToModelSeries(const std::shared_ptr< const ::fwMedData::DicomSeries > &series)
Convert a DicomSeries to a ModelSeries.
fwDicomTools contains general tools to handle DICOM format