Add modality in patient data.
This commit is contained in:
@@ -115,6 +115,16 @@ std::string PatientData::getLaterality() const
|
||||
return mLaterality;
|
||||
}
|
||||
|
||||
void PatientData::setModality(const std::string& aModality)
|
||||
{
|
||||
mModality = aModality;
|
||||
}
|
||||
|
||||
std::string PatientData::getModality() const
|
||||
{
|
||||
return mModality;
|
||||
}
|
||||
|
||||
void PatientData::setIsEmptyData(bool aIsEmptyData)
|
||||
{
|
||||
mIsEmptyData = aIsEmptyData;
|
||||
|
||||
@@ -20,6 +20,7 @@ public:
|
||||
std::string getPatientSex() const;
|
||||
std::string getPatientBirthDate();
|
||||
std::string getLaterality() const;
|
||||
std::string getModality() const;
|
||||
bool getIsEmptyData() const;
|
||||
|
||||
private:
|
||||
@@ -34,6 +35,7 @@ private:
|
||||
void setPatientSex(const std::string& aPatientSex);
|
||||
void setPatientBirthDate(const std::string& aPatientBirthDate);
|
||||
void setLaterality(const std::string& aLaterality);
|
||||
void setModality(const std::string& aModality);
|
||||
void setIsEmptyData(bool aIsEmptyData);
|
||||
|
||||
private:
|
||||
@@ -48,6 +50,7 @@ private:
|
||||
std::string mPatientSex;
|
||||
std::string mPatientBirthDate;
|
||||
std::string mLaterality;
|
||||
std::string mModality;
|
||||
bool mIsEmptyData;
|
||||
|
||||
friend class PatientDataReader;
|
||||
|
||||
@@ -155,6 +155,11 @@ PatientData PatientDataReader::getPatientDataFromHJ(const std::string& aFilePath
|
||||
{
|
||||
result.setStudyUID(patientObj.at("StudyUID").get<std::string>());
|
||||
}
|
||||
|
||||
if(patientObj.contains("Modality"))
|
||||
{
|
||||
result.setModality(patientObj.at("Modality").get<std::string>());
|
||||
}
|
||||
delete[] patientCString;
|
||||
stream.close();
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user