Medical Imaging Interaction Toolkit  2018.4.99-b5518f0d
Medical Imaging Interaction Toolkit
mitkITKDICOMSeriesReaderHelper.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef mitkDICOMSeriesReaderHelper_h
14 #define mitkDICOMSeriesReaderHelper_h
15 
16 #include "mitkImage.h"
18 #include "mitkDICOMTag.h"
19 
20 #include <itkGDCMImageIO.h>
21 
22 /* Forward deceleration of an DCMTK class. Used in the txx but part of the interface.*/
23 class OFDateTime;
24 
25 namespace mitk
26 {
27 
29 {
30  public:
31 
34  static const DICOMTag TriggerTimeTag;
35 
36  typedef std::vector<std::string> StringContainer;
37  typedef std::list<StringContainer> StringContainerList;
38 
39  Image::Pointer Load( const StringContainer& filenames, bool correctTilt, const GantryTiltInformation& tiltInfo );
40  Image::Pointer Load3DnT( const StringContainerList& filenamesLists, bool correctTilt, const GantryTiltInformation& tiltInfo );
41 
42  static bool CanHandleFile(const std::string& filename);
43 
44  private:
45 
46  typedef std::vector<TimeBounds> TimeBoundsList;
47  typedef itk::FixedArray<OFDateTime,2> DateTimeBounds;
48 
49 
58  static bool ExtractDateTimeBoundsAndTriggerOfTimeStep( const StringContainer& filenamesOfTimeStep,
59  DateTimeBounds& bounds, TimeBounds& triggerBounds);
60 
61  /* Determine the time bounds in ms respective to the baselineDateTime for the passed
62  files. Additionaly it regards the trigger time tag if set and acquisition date time
63  carries not enough information.*/
64  static bool ExtractTimeBoundsOfTimeStep(const StringContainer& filenamesOfTimeStep,
65  TimeBounds& bounds,
66  const OFDateTime& baselineDateTime );
67 
68 
75  static TimeBoundsList ExtractTimeBoundsOfTimeSteps (const StringContainerList& filenamesOfTimeSteps);
76 
80  static TimeGeometry::Pointer GenerateTimeGeometry(const BaseGeometry* templateGeometry, const TimeBoundsList& boundsList);
81 
82  template <typename ImageType>
83  typename ImageType::Pointer
84  FixUpTiltedGeometry( ImageType* input, const GantryTiltInformation& tiltInfo );
85 
86  template <typename PixelType>
88  LoadDICOMByITK( const StringContainer& filenames,
89  bool correctTilt,
90  const GantryTiltInformation& tiltInfo,
91  itk::GDCMImageIO::Pointer& io);
92 
93  template <typename PixelType>
95  LoadDICOMByITK3DnT( const StringContainerList& filenames,
96  bool correctTilt,
97  const GantryTiltInformation& tiltInfo,
98  itk::GDCMImageIO::Pointer& io);
99 
100 
101 };
102 
103 }
104 
105 #endif
static bool CanHandleFile(const std::string &filename)
itk::FixedArray< ScalarType, 2 > TimeBounds
Standard typedef for time-bounds.
Representation of a DICOM tag.
Definition: mitkDICOMTag.h:32
DataCollection - Class to facilitate loading/accessing structured data.
std::list< StringContainer > StringContainerList
Image::Pointer Load(const StringContainer &filenames, bool correctTilt, const GantryTiltInformation &tiltInfo)
Gantry tilt analysis result.
Image::Pointer Load3DnT(const StringContainerList &filenamesLists, bool correctTilt, const GantryTiltInformation &tiltInfo)
BaseGeometry Describes the geometry of a data object.