Medical Imaging Interaction Toolkit  2024.06.00
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 mitkITKDICOMSeriesReaderHelper_h
14 #define mitkITKDICOMSeriesReaderHelper_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. Additionally 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
mitk::ITKDICOMSeriesReaderHelper::TriggerTimeTag
static const DICOMTag TriggerTimeTag
Definition: mitkITKDICOMSeriesReaderHelper.h:34
mitkImage.h
mitk::ITKDICOMSeriesReaderHelper::Load3DnT
Image::Pointer Load3DnT(const StringContainerList &filenamesLists, bool correctTilt, const GantryTiltInformation &tiltInfo)
mitk::ITKDICOMSeriesReaderHelper::AcquisitionDateTag
static const DICOMTag AcquisitionDateTag
Definition: mitkITKDICOMSeriesReaderHelper.h:32
itk::SmartPointer< Self >
mitk::ITKDICOMSeriesReaderHelper::StringContainer
std::vector< std::string > StringContainer
Definition: mitkITKDICOMSeriesReaderHelper.h:36
mitk::DICOMTag
Representation of a DICOM tag.
Definition: mitkDICOMTag.h:32
mitk::GantryTiltInformation
Gantry tilt analysis result.
Definition: mitkGantryTiltInformation.h:38
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::ITKDICOMSeriesReaderHelper::Load
Image::Pointer Load(const StringContainer &filenames, bool correctTilt, const GantryTiltInformation &tiltInfo)
mitk::ITKDICOMSeriesReaderHelper::StringContainerList
std::list< StringContainer > StringContainerList
Definition: mitkITKDICOMSeriesReaderHelper.h:37
mitkGantryTiltInformation.h
mitk::BaseGeometry
BaseGeometry Describes the geometry of a data object.
Definition: mitkBaseGeometry.h:94
mitk::ITKDICOMSeriesReaderHelper::CanHandleFile
static bool CanHandleFile(const std::string &filename)
mitkDICOMTag.h
mitk::ITKDICOMSeriesReaderHelper::AcquisitionTimeTag
static const DICOMTag AcquisitionTimeTag
Definition: mitkITKDICOMSeriesReaderHelper.h:33
mitk::TimeBounds
itk::FixedArray< ScalarType, 2 > TimeBounds
Standard typedef for time-bounds.
Definition: mitkBaseGeometry.h:44
mitk::ITKDICOMSeriesReaderHelper
Definition: mitkITKDICOMSeriesReaderHelper.h:28