软著提交相关内容补充
This commit is contained in:
@@ -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)));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -1,23 +1,31 @@
|
||||
project(DIDKit)
|
||||
|
||||
set (DIDKit_VERSION_MAJOR 1)
|
||||
set (DIDKit_VERSION_MINOR 0)
|
||||
set (DIDKit_VERSION_BUILD 0)
|
||||
set(DIDKit_VERSION "${DIDKit_VERSION_MAJOR}.${DIDKit_VERSION_MINOR}.${DIDKit_VERSION_BUILD}")
|
||||
|
||||
file(GLOB_RECURSE DIDKit_IO_headers ../src/src/IO/*.h)
|
||||
file(GLOB_RECURSE DIDKit_IO_cpps ../src/src/IO/*.cpp)
|
||||
file(GLOB_RECURSE DIDKit_PACS_headers ../src/src/PACS/*.h)
|
||||
file(GLOB_RECURSE DIDKit_PACS_cpps ../src/src/PACS/*.cpp)
|
||||
file(GLOB_RECURSE DIDKit_Network_headers ../thirdparty/*.h)
|
||||
file(GLOB_RECURSE DIDKit_Network_cpps ./thirdparty/*.cpp)
|
||||
file(GLOB_RECURSE DIDKit_App_headers ./*/*.h)
|
||||
file(GLOB_RECURSE DIDKit_App_cpps ./*/*.cpp)
|
||||
set(BUILD_SHARED_LIBS ON)
|
||||
if (${BUILD_SHARED_LIBS})
|
||||
set(DIDKit_BUILD_SHARED_LIBS ON)
|
||||
if (${DIDKit_BUILD_SHARED_LIBS})
|
||||
include_directories(Defines/)
|
||||
endif()
|
||||
include_directories(../src/src/)
|
||||
include_directories(./App/)
|
||||
|
||||
add_library(DIDKit SHARED ${DIDKit_headers} ${DIDKit_cpps})
|
||||
add_library(DIDKit SHARED ${DIDKit_IO_headers} ${DIDKit_IO_cpps})
|
||||
|
||||
option(BUILD_DIDKit_APP "Build DIDKit App" ON)
|
||||
set(BUILD_DIDKit_APP ON)
|
||||
|
||||
set(CMAKE_INSTALL_PREFIX D:/Libs/binary/TestLib)
|
||||
|
||||
find_package(DCMTK REQUIRED)
|
||||
include_directories(${DCMTK_INCLUDE_DIRS})
|
||||
@@ -26,21 +34,75 @@ include_directories(${DCM_NETWORK_INCLUDE_DIRS})
|
||||
find_package(VTK REQUIRED)
|
||||
include(${VTK_USE_FILE})
|
||||
|
||||
include_directories(${DCM_NETWORK_INCLUDE_DIRS})
|
||||
|
||||
target_link_libraries(DIDKit ${DCMTK_LIBRARIES})
|
||||
target_link_libraries(DIDKit ${VTK_LIBRARIES})
|
||||
target_link_libraries(DIDKit dcm_network)
|
||||
add_dependencies(DIDKit dcm_network)
|
||||
|
||||
file(GLOB_RECURSE DIDKit_UI ./*/*.ui)
|
||||
qt5_wrap_ui(DIDKit_UI_FILES ${DIDKit_UI})
|
||||
|
||||
if(${BUILD_DIDKit_APP})
|
||||
add_executable(DIDKitApp ${DIDKit_IO_headers} ${DIDKit_IO_cpps} ${DIDKit_App_headers} ${DIDKit_App_cpps} ${DIDKit_PACS_headers} ${DIDKit_PACS_cpps} ${DIDKit_UI_FILES})
|
||||
include_directories(${DCM_NETWORK_INCLUDE_DIRS})
|
||||
file(GLOB_RECURSE DIDKit_UI ./*/*.ui)
|
||||
qt5_wrap_ui(DIDKit_UI_FILES ${DIDKit_UI})
|
||||
add_executable(DIDKitApp ${DIDKit_IO_headers} ${DIDKit_IO_cpps} ${DIDKit_App_headers}
|
||||
${project_res} ${DIDKit_App_cpps} ${DIDKit_PACS_headers} ${DIDKit_PACS_cpps}
|
||||
${DIDKit_Network_headers} ${DIDKit_Network_cpps} ${DIDKit_UI_FILES})
|
||||
target_link_libraries(DIDKitApp ${DCMTK_LIBRARIES})
|
||||
target_link_libraries(DIDKitApp ${VTK_LIBRARIES})
|
||||
target_link_libraries(DIDKitApp dcm_network)
|
||||
add_dependencies(DIDKitApp dcm_network)
|
||||
target_link_libraries(DIDKitApp Qt5::Core Qt5::Widgets Qt5::Gui)
|
||||
endif()
|
||||
|
||||
|
||||
set_property(TARGET DIDKit PROPERTY VERSION ${DIDKit_VERSION})
|
||||
set_property(TARGET DIDKit PROPERTY SOVERSION 1)
|
||||
set_property(TARGET DIDKit PROPERTY
|
||||
INTERFACE_DIDKit_MAJOR_VERSION 1)
|
||||
set_property(TARGET DIDKit APPEND PROPERTY
|
||||
COMPATIBLE_INTERFACE_STRING DIDKit_MAJOR_VERSION)
|
||||
|
||||
install(TARGETS DIDKit EXPORT DIDKitTargets
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
)
|
||||
|
||||
install(
|
||||
FILES
|
||||
${DIDKit_IO_headers}
|
||||
DESTINATION
|
||||
include/IO
|
||||
COMPONENT
|
||||
Devel
|
||||
)
|
||||
|
||||
include(CMakePackageConfigHelpers)
|
||||
write_basic_package_version_file(
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/DIDKit/DIDKitConfigVersion.cmake"
|
||||
VERSION ${DIDKit_VERSION}
|
||||
COMPATIBILITY AnyNewerVersion
|
||||
)
|
||||
|
||||
configure_file( ${CMAKE_CURRENT_LIST_DIR}/cmake/DIDKitConfig.cmake.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/DIDKitConfig.cmake
|
||||
@ONLY
|
||||
)
|
||||
|
||||
set(ConfigPackageLocation lib/cmake/DIDKit)
|
||||
install(EXPORT DIDKitTargets
|
||||
FILE
|
||||
DIDKitTargets.cmake
|
||||
DESTINATION
|
||||
${ConfigPackageLocation}
|
||||
)
|
||||
|
||||
|
||||
install(
|
||||
FILES
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/DIDKitConfig.cmake"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/DIDKit/DIDKitConfigVersion.cmake"
|
||||
DESTINATION
|
||||
${ConfigPackageLocation}
|
||||
COMPONENT
|
||||
Devel
|
||||
)
|
||||
25
DIDKit/cmake/DIDKitConfig.cmake.in
Normal file
25
DIDKit/cmake/DIDKitConfig.cmake.in
Normal file
@@ -0,0 +1,25 @@
|
||||
set(DIDKIT_LIBRARIES DIDKit)
|
||||
|
||||
# The configuration options.
|
||||
set(DIDKIT_BUILD_SHARED_LIBS "@BUILD_SHARED_LIBS@")
|
||||
|
||||
get_filename_component(SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
||||
if(EXISTS ${SELF_DIR}/DIDKITTargets.cmake)
|
||||
# This is an install tree
|
||||
include(${SELF_DIR}/DIDKITTargets.cmake)
|
||||
get_filename_component(DIDKIT_INCLUDE_ROOT "${SELF_DIR}/../../../include" ABSOLUTE)
|
||||
set(DIDKIT_INCLUDE_DIRS ${DIDKIT_INCLUDE_ROOT})
|
||||
else()
|
||||
if(EXISTS ${SELF_DIR}/DIDKITExports.cmake)
|
||||
# This is a build tree
|
||||
set( DIDKIT_INCLUDE_DIRS "@CMAKE_SOURCE_DIR@/include")
|
||||
|
||||
include(${SELF_DIR}/DIDKITExports.cmake)
|
||||
|
||||
else()
|
||||
message(FATAL_ERROR "fail to load DIDKIT")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Backward compatible part:
|
||||
set(DIDKIT_FOUND TRUE)
|
||||
Reference in New Issue
Block a user