From 0f8974db0ed68e5167366c6cdc4106f5778b5fc9 Mon Sep 17 00:00:00 2001 From: Krad Date: Tue, 22 Feb 2022 09:19:39 +0800 Subject: [PATCH] Rename Orientation --- src/include/base/DicomLoader.h | 8 ++++---- src/src/base/DicomLoader.cpp | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/include/base/DicomLoader.h b/src/include/base/DicomLoader.h index 5ad50dd..a526a71 100644 --- a/src/include/base/DicomLoader.h +++ b/src/include/base/DicomLoader.h @@ -3,14 +3,14 @@ #include "global/include_vitk.h" using namespace std; -typedef std::map> OrienMapType; -class OrienHelper +typedef std::map> OrientationMapType; +class orientationHelper { public: static std::string StringFilter(char* str); static void init(); - static std::vector* getOrienStrList(const std::string &index); - static OrienMapType orien_map; + static std::vector* getOrientationStrList(const std::string &index); + static OrientationMapType orien_map; }; class SeriesInstance; diff --git a/src/src/base/DicomLoader.cpp b/src/src/base/DicomLoader.cpp index 96e32c4..745e4ad 100644 --- a/src/src/base/DicomLoader.cpp +++ b/src/src/base/DicomLoader.cpp @@ -16,7 +16,7 @@ #define ORIEN_NUM 4 #define SINGLE_INSTANCE 1 -OrienMapType OrienHelper::orien_map; +OrientationMapType orientationHelper::orien_map; /************************************************************************ * [Q]Is there anything different between these two? @@ -25,7 +25,7 @@ OrienMapType OrienHelper::orien_map; * [Q]I have no idea why it works just fine not using deep copy, while the vtkdata is replaced in the Qfusion Project using exatly the same workflow! /************************************************************************/ -std::string OrienHelper::StringFilter(char* str) +std::string orientationHelper::StringFilter(char* str) { const char s[] = "\\ "; char *token; @@ -40,7 +40,7 @@ std::string OrienHelper::StringFilter(char* str) return trim; } -void OrienHelper::init() +void orientationHelper::init() { const std::string index[] = { "LH","LF","RH","RF" }; std::vector indexList(std::begin(index), std::end(index)); @@ -63,11 +63,11 @@ void OrienHelper::init() for (int i = 0; i < ORIEN_NUM; i++) { - OrienHelper::orien_map.insert(std::pair>(indexList.at(i),retList.at(i))); + orientationHelper::orien_map.insert(std::pair>(indexList.at(i), retList.at(i))); } } -std::vector* OrienHelper::getOrienStrList(const std::string &index) +std::vector* orientationHelper::getOrientationStrList(const std::string &index) { const char* s = index.c_str(); @@ -76,7 +76,7 @@ std::vector* OrienHelper::getOrienStrList(const std::string &index) strcpy_s(hint, len + 1, s); std::string trim = StringFilter(hint); - OrienMapType::iterator it = OrienHelper::orien_map.find(trim); + OrientationMapType::iterator it = orientationHelper::orien_map.find(trim); delete hint; if (it == orien_map.end())