Medical Imaging Interaction Toolkit
2024.12.99-0da743f6
Medical Imaging Interaction Toolkit
|
#include <mitkCustomTagParser.h>
Public Member Functions | |
CustomTagParser (std::string relevantFile) | |
the constructor expects a path to one of the files to be loaded or the directory of the dicom files More... | |
mitk::PropertyList::Pointer | ParseDicomProperty (mitk::TemporoSpatialStringProperty *dicomProperty) |
parse the provided dicom property and return a property list based on the closest revision parameter mapping More... | |
mitk::PropertyList::Pointer | ParseDicomPropertyString (std::string dicomPropertyString) |
parse the provided string and return a property list based on the closest revision parameter mapping More... | |
void | SetParseStrategy (std::string parseStrategy) |
void | SetRevisionMappingStrategy (std::string revisionMappingStrategy) |
Static Public Member Functions | |
static std::string | ReadListFromFile (const std::string &filePath) |
static std::string | ExtractRevision (std::string sequenceFileName) |
Static Public Attributes | |
static const std::string | m_RevisionPropertyName |
name of the property for the data acquisition revision More... | |
static const std::string | m_JSONRevisionPropertyName |
name of the property for the json parameter mapping revision More... | |
static const std::string | m_CESTPropertyPrefix |
prefix for all CEST related property names More... | |
Protected Member Functions | |
std::string | GetRevisionAppropriateJSONString (std::string revisionString) |
void | GetClosestLowerRevision (std::string revisionString) |
std::string | GetClosestLowerRevision (std::string revisionString, std::vector< int > availableRevisionsVector) |
bool | IsT1Sequence (std::string preparationType, std::string recoveryMode, std::string spoilingType, std::string revisionString) |
Decides whether or not the image is likely to be a T1Map, if not it is assumed to be a CEST sequence. More... | |
std::string | GetOffsetString (std::string samplingType, std::string offset, std::string measurements) |
Get a string filled with the properly formatted offsets based on the sampling type and offset. More... | |
std::vector< int > | GetExternalRevisions () |
returns a vector revision numbers of all REVISIONNUMBER.json found beside the MitkCEST library More... | |
std::vector< int > | GetInternalRevisions () |
returns a vector revision numbers of all REVISIONNUMBER.json provided as resources during the compile More... | |
std::string | GetExternalJSONDirectory () |
returns the path where external jsons are expected to be located More... | |
Protected Attributes | |
std::string | m_ClosestInternalRevision |
the closest lower revision provided as resource, empty if none found More... | |
std::string | m_ClosestExternalRevision |
the closest lower revision provided as a json beside the library, empty if none found More... | |
std::string | m_DicomDataPath |
path to the dicom data More... | |
std::string | m_ParseStrategy |
Should the kind of data be automatically determined or should it be parsed as a specific one. More... | |
std::string | m_RevisionMappingStrategy |
How to handle parameter mapping based on absent revision jsons. More... | |
Static Protected Attributes | |
static const std::string | m_RevisionIndependentMapping |
revision independent mapping to inject into the revision dependent json string More... | |
static const std::string | m_DefaultJsonString |
default revision dependent json string if none is found More... | |
The custom tag parser can be used to parse the custom dicom tag of the siemens private tag (0x0029, 0x1020) to extract relevant CEST data.
An initial parsing determines whether the provided string belongs to CEST data at all. To make the check and extract the revision number the following rules are applied:
Which custom parameters to save and to which property name can be controlled by a json file. This file can be either provided as a resource for the MitkCEST module during compilation or placed next to the MitkCEST library in your binary folder.
The expected format for the file "REVISIONNUMBER.json":
{
"REVISIONNUMBER" : "revision_json",
"sWiPMemBlock.alFree[1]" : "AdvancedMode",
"sWiPMemBlock.alFree[2]" : "RetreatMode"
}
where :
If the sampling type is list it will try to access LIST.txt at the location provided in the constructor to read the offsets.
Definition at line 70 of file mitkCustomTagParser.h.
mitk::CustomTagParser::CustomTagParser | ( | std::string | relevantFile | ) |
the constructor expects a path to one of the files to be loaded or the directory of the dicom files
|
static |
Extract the revision out of the passed sequenceFileName. If the file name is not a valid CEST file name (see rules in the class documentation) exceptions will be thrown. If the file name is valid but contains no revision number an empty string will be returned.
|
protected |
|
protected |
|
protected |
returns the path where external jsons are expected to be located
|
protected |
returns a vector revision numbers of all REVISIONNUMBER.json found beside the MitkCEST library
|
protected |
returns a vector revision numbers of all REVISIONNUMBER.json provided as resources during the compile
|
protected |
Get a string filled with the properly formatted offsets based on the sampling type and offset.
|
protected |
|
protected |
Decides whether or not the image is likely to be a T1Map, if not it is assumed to be a CEST sequence.
mitk::PropertyList::Pointer mitk::CustomTagParser::ParseDicomProperty | ( | mitk::TemporoSpatialStringProperty * | dicomProperty | ) |
parse the provided dicom property and return a property list based on the closest revision parameter mapping
mitk::PropertyList::Pointer mitk::CustomTagParser::ParseDicomPropertyString | ( | std::string | dicomPropertyString | ) |
parse the provided string and return a property list based on the closest revision parameter mapping
|
static |
void mitk::CustomTagParser::SetParseStrategy | ( | std::string | parseStrategy | ) |
void mitk::CustomTagParser::SetRevisionMappingStrategy | ( | std::string | revisionMappingStrategy | ) |
|
static |
prefix for all CEST related property names
Definition at line 99 of file mitkCustomTagParser.h.
|
protected |
the closest lower revision provided as a json beside the library, empty if none found
Definition at line 123 of file mitkCustomTagParser.h.
|
protected |
the closest lower revision provided as resource, empty if none found
Definition at line 121 of file mitkCustomTagParser.h.
|
staticprotected |
default revision dependent json string if none is found
Definition at line 128 of file mitkCustomTagParser.h.
|
protected |
path to the dicom data
Definition at line 130 of file mitkCustomTagParser.h.
|
static |
name of the property for the json parameter mapping revision
Definition at line 96 of file mitkCustomTagParser.h.
|
protected |
Should the kind of data be automatically determined or should it be parsed as a specific one.
Definition at line 132 of file mitkCustomTagParser.h.
|
staticprotected |
revision independent mapping to inject into the revision dependent json string
Definition at line 126 of file mitkCustomTagParser.h.
|
protected |
How to handle parameter mapping based on absent revision jsons.
Definition at line 134 of file mitkCustomTagParser.h.
|
static |
name of the property for the data acquisition revision
Definition at line 93 of file mitkCustomTagParser.h.