软著提交相关内容补充

This commit is contained in:
Krad
2022-09-28 13:28:10 +08:00
parent cc4326ded3
commit 7b57cbd937
20 changed files with 639 additions and 84 deletions

View File

@@ -121,32 +121,44 @@ void FileModel::setModelData()
std::map<std::string,PatientInfo*>::iterator patientIter;
for(patientIter = mPatientList->begin();patientIter != mPatientList->end(); ++patientIter)
{
FileItem* patient = new FileItem(
FileItemDataPointer(new QVariant(QString("Patient: %1, Name: %2, Birth Date: %3")
.arg(patientIter->first.c_str(),patientIter->second->patient_name.c_str(),patientIter->second->birth_date.c_str()))),mRootItem);
FileItem* patient = new FileItem(FileItemDataPointer(
new QVariant(
QString("Patient: %1, Name: %2, Birth Date: %3")
.arg(patientIter->first.c_str(),
patientIter->second->patient_name.c_str(),
patientIter->second->birth_date.c_str())))
,mRootItem);
//Study Node
std::map<std::string,StudyInfo*>::iterator studyIter;
StudiesMapType* studyMap = patientIter->second->studies;
for(studyIter = studyMap->begin();studyIter != studyMap->end(); ++studyIter)
{
FileItem* study = new FileItem(FileItemDataPointer(new QVariant(QString("Study: %1, Date: %2")
.arg(studyIter->first.c_str(), studyIter->second->study_date.c_str()))),patient);
FileItem* study = new FileItem(FileItemDataPointer(
new QVariant(QString("Study: %1, Date: %2")
.arg(studyIter->first.c_str(),
studyIter->second->study_date.c_str()))),patient);
//Series Node
std::map<std::string,ImageSetMapType*>::iterator seriesIter;
SeriesMapType* seriesMap = studyIter->second->series;
for(seriesIter = seriesMap->begin();seriesIter != seriesMap->end(); ++seriesIter)
{
FileItem* series = new FileItem(FileItemDataPointer(new QVariant(QString("Series: ")+seriesIter->first.c_str())),study);
FileItem* series = new FileItem(FileItemDataPointer(
new QVariant(QString("Series: ")+seriesIter->first.c_str())),study);
//Image Set Node
std::map<std::string,ExtendMedicalImageProperties*>::iterator imageSetIter;
ImageSetMapType* imageSetMap = seriesIter->second;
for(imageSetIter = imageSetMap->begin();imageSetIter != imageSetMap->end(); ++imageSetIter)
for(imageSetIter = imageSetMap->begin();
imageSetIter != imageSetMap->end();
++imageSetIter)
{
ExtendMedicalImageProperties* property = imageSetIter->second;
FileItem* imageSet = new FileItem(FileItemDataPointer(new QVariant(QString("ImageSet: ")+imageSetIter->first.c_str() + QString(" ")
+ QString::number(property->GetFileNames().size())))
, series
, FileItemActionPointer(new FileItemAction(mTableModel,property)));
FileItem* imageSet =
new FileItem(FileItemDataPointer(
new QVariant(QString("ImageSet: ")
+ imageSetIter->first.c_str() + QString(" ")
+ QString::number(property->GetFileNames().size())))
, series
, FileItemActionPointer(new FileItemAction(mTableModel,property)));
}
}

View File

@@ -14,14 +14,17 @@ public:
explicit FileModel(PropertyTableModel* aTableModel, QObject *parent = nullptr);
~FileModel() override;
// override superclass method
QVariant data(const QModelIndex &aIndex, int aRole) const override;
// Qt::ItemFlags flags(const QModelIndex &aIndex) const override;
// QVariant headerData(int aSection, Qt::Orientation orientation,
// int aRole = Qt::DisplayRole) const override;
QModelIndex index(int aRow, int aColumn, const QModelIndex &aParent = QModelIndex()) const override;
QModelIndex parent(const QModelIndex &aIndex) const override;
int rowCount(const QModelIndex &aParent = QModelIndex()) const override;
int columnCount(const QModelIndex &aParent = QModelIndex()) const override;
void setModelData();
void clearModelData();
void executeItemAction(const QModelIndex& aIndex);