Skip to content

Commit

Permalink
refactor(image-sets-normalization): revamp data structures
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulHax committed Mar 28, 2024
1 parent 2553931 commit eac5f09
Show file tree
Hide file tree
Showing 7 changed files with 270 additions and 153 deletions.
2 changes: 1 addition & 1 deletion packages/dicom/gdcm/DICOMTagReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ namespace itk
{
public:
using MetaDictType = itk::MetaDataDictionary;
using TagMapType = std::map<std::string, std::string>;
using TagMapType = std::unordered_map<std::string, std::string>;

DICOMTagReader()
: m_dirtyCache(true)
Expand Down
68 changes: 68 additions & 0 deletions packages/dicom/gdcm/Tags.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
/*=========================================================================
*
* Copyright NumFOCUS
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0.txt
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*=========================================================================*/
#ifndef TAGS_H
#define TAGS_H

#include <string>
#include <unordered_set>

using Tags = std::unordered_set<std::string>;

const Tags PATIENT_TAGS = {
"0010|0010", // Patient's Name
"0010|0020", // Patient ID
"0010|0030", // Patient's Birth Date
"0010|0040", // Patient's Sex
"0010|1010", // Patient's Age
"0010|1030", // Patient's Weight
"0010|21b0", // Additional Patient's History
};

const Tags STUDY_TAGS = {
"0020|000D", // Study Instance UID
"0008|0020", // Study Date
"0008|0030", // Study Time
"0008|1030", // Study Description
"0008|0050", // Accession Number
};

const Tags SERIES_TAGS = {
"0020|000e", // Series Instance UID
"0008|103e", // Series Description
"0008|0060", // Modality
};

const Tags NON_INSTANCE_TAGS = {
"0010|0010", // Patient's Name
"0010|0020", // Patient ID
"0010|0030", // Patient's Birth Date
"0010|0040", // Patient's Sex
"0010|1010", // Patient's Age
"0010|1030", // Patient's Weight
"0010|21b0", // Additional Patient's History
"0020|000D", // Study Instance UID
"0008|0020", // Study Date
"0008|0030", // Study Time
"0008|1030", // Study Description
"0008|0050", // Accession Number
"0020|000e", // Series Instance UID
"0008|103e", // Series Description
"0008|0060", // Modality
};

#endif // TAGS_H
Loading

0 comments on commit eac5f09

Please sign in to comment.