Rename Orientation
This commit is contained in:
@@ -3,14 +3,14 @@
|
|||||||
#include "global/include_vitk.h"
|
#include "global/include_vitk.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
typedef std::map<std::string,std::vector<std::string>> OrienMapType;
|
typedef std::map<std::string,std::vector<std::string>> OrientationMapType;
|
||||||
class OrienHelper
|
class orientationHelper
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static std::string StringFilter(char* str);
|
static std::string StringFilter(char* str);
|
||||||
static void init();
|
static void init();
|
||||||
static std::vector<std::string>* getOrienStrList(const std::string &index);
|
static std::vector<std::string>* getOrientationStrList(const std::string &index);
|
||||||
static OrienMapType orien_map;
|
static OrientationMapType orien_map;
|
||||||
};
|
};
|
||||||
|
|
||||||
class SeriesInstance;
|
class SeriesInstance;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
#define ORIEN_NUM 4
|
#define ORIEN_NUM 4
|
||||||
#define SINGLE_INSTANCE 1
|
#define SINGLE_INSTANCE 1
|
||||||
OrienMapType OrienHelper::orien_map;
|
OrientationMapType orientationHelper::orien_map;
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
* [Q]Is there anything different between these two?
|
* [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,
|
* [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!
|
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[] = "\\ ";
|
const char s[] = "\\ ";
|
||||||
char *token;
|
char *token;
|
||||||
@@ -40,7 +40,7 @@ std::string OrienHelper::StringFilter(char* str)
|
|||||||
return trim;
|
return trim;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OrienHelper::init()
|
void orientationHelper::init()
|
||||||
{
|
{
|
||||||
const std::string index[] = { "LH","LF","RH","RF" };
|
const std::string index[] = { "LH","LF","RH","RF" };
|
||||||
std::vector<std::string> indexList(std::begin(index), std::end(index));
|
std::vector<std::string> indexList(std::begin(index), std::end(index));
|
||||||
@@ -63,11 +63,11 @@ void OrienHelper::init()
|
|||||||
|
|
||||||
for (int i = 0; i < ORIEN_NUM; i++)
|
for (int i = 0; i < ORIEN_NUM; i++)
|
||||||
{
|
{
|
||||||
OrienHelper::orien_map.insert(std::pair<std::string, std::vector<std::string>>(indexList.at(i),retList.at(i)));
|
orientationHelper::orien_map.insert(std::pair<std::string, std::vector<std::string>>(indexList.at(i), retList.at(i)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<std::string>* OrienHelper::getOrienStrList(const std::string &index)
|
std::vector<std::string>* orientationHelper::getOrientationStrList(const std::string &index)
|
||||||
{
|
{
|
||||||
|
|
||||||
const char* s = index.c_str();
|
const char* s = index.c_str();
|
||||||
@@ -76,7 +76,7 @@ std::vector<std::string>* OrienHelper::getOrienStrList(const std::string &index)
|
|||||||
strcpy_s(hint, len + 1, s);
|
strcpy_s(hint, len + 1, s);
|
||||||
|
|
||||||
std::string trim = StringFilter(hint);
|
std::string trim = StringFilter(hint);
|
||||||
OrienMapType::iterator it = OrienHelper::orien_map.find(trim);
|
OrientationMapType::iterator it = orientationHelper::orien_map.find(trim);
|
||||||
delete hint;
|
delete hint;
|
||||||
|
|
||||||
if (it == orien_map.end())
|
if (it == orien_map.end())
|
||||||
|
|||||||
Reference in New Issue
Block a user