Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
mitkCustomTagParser.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 MITKCUSTOMTAGPARSER_H
14 #define MITKCUSTOMTAGPARSER_H
15 
16 #include<mitkPropertyList.h>
18 
19 #include <MitkCESTExports.h>
20 
21 namespace mitk
22 {
71  {
72  public:
74  CustomTagParser(std::string relevantFile);
75 
77  mitk::PropertyList::Pointer ParseDicomProperty(mitk::TemporoSpatialStringProperty *dicomProperty);
79  mitk::PropertyList::Pointer ParseDicomPropertyString(std::string dicomPropertyString);
80 
85  static std::string ExtractRevision(std::string sequenceFileName);
86 
87  void SetParseStrategy(std::string parseStrategy);
88  void SetRevisionMappingStrategy(std::string revisionMappingStrategy);
89 
91  static const std::string m_OffsetsPropertyName;
92 
94  static const std::string m_RevisionPropertyName;
95 
97  static const std::string m_JSONRevisionPropertyName;
98 
100  static const std::string m_CESTPropertyPrefix;
101 
102  protected:
103  std::string GetRevisionAppropriateJSONString(std::string revisionString);
104  void GetClosestLowerRevision(std::string revisionString);
105  std::string GetClosestLowerRevision(std::string revisionString, std::vector<int> availableRevisionsVector);
106 
108  bool IsT1Sequence(std::string preparationType, std::string recoveryMode, std::string spoilingType, std::string revisionString);
109 
111  std::string GetOffsetString(std::string samplingType, std::string offset, std::string measurements);
112 
114  std::vector<int> GetExternalRevisions();
116  std::vector<int> GetInternalRevisions();
117 
119  std::string GetExternalJSONDirectory();
120 
125 
127  static const std::string m_RevisionIndependentMapping;
129  static const std::string m_DefaultJsonString;
131  std::string m_DicomDataPath;
133  std::string m_ParseStrategy;
136  };
137 
142  const std::string MITKCEST_EXPORT CEST_PROPERTY_NAME_OFFSETS();
143  const std::string MITKCEST_EXPORT CEST_PROPERTY_NAME_TREC();
144 
145 }
146 
147 #endif // MITKCUSTOMTAGPARSER_H
const std::string MITKCEST_EXPORT CEST_PROPERTY_NAME_PREPERATIONTYPE()
const std::string MITKCEST_EXPORT CEST_PROPERTY_NAME_OFFSETS()
DataCollection - Class to facilitate loading/accessing structured data.
static const std::string m_CESTPropertyPrefix
prefix for all CEST related property names
const std::string MITKCEST_EXPORT CEST_PROPERTY_NAME_TOTALSCANTIME()
static const std::string m_RevisionPropertyName
name of the property for the data acquisition revision
static Vector3D offset
const std::string MITKCEST_EXPORT CEST_PROPERTY_NAME_TREC()
std::string m_RevisionMappingStrategy
How to handle parameter mapping based on absent revision jsons.
std::string m_DicomDataPath
path to the dicom data
const std::string MITKCEST_EXPORT CEST_PROPERTY_NAME_RECOVERYMODE()
std::string m_ClosestExternalRevision
the closest lower revision provided as a json beside the library, empty if none found ...
static const std::string m_DefaultJsonString
default revision dependent json string if none is found
std::string m_ClosestInternalRevision
the closest lower revision provided as resource, empty if none found
std::string m_ParseStrategy
Should the kind of data be automatically determined or should it be parsed as a specific one...
static const std::string m_RevisionIndependentMapping
revision independent mapping to inject into the revision dependent json string
#define MITKCEST_EXPORT
const std::string MITKCEST_EXPORT CEST_PROPERTY_NAME_SPOILINGTYPE()
static const std::string m_JSONRevisionPropertyName
name of the property for the json parameter mapping revision
static const std::string m_OffsetsPropertyName
name of the property for the offsets, including normalization offsets
Property for time and space resolved string values.