Skip to content

Commit 3151526

Browse files
committed
Merge branch 'HAIApplication'
* HAIApplication: Fix 3DButtonRepresentation widget initialization Cleanup HAI build system Add picking GUI feedback to HAI demo Add msvVTKCompositeActor to color compositedata Add msvVTKLODWidget to pick composite dataset Add support for null file in msvVTKXMLMultiblockLODReader Add HAI demo, the human anatomy demo to demonstrate LOD reader msvVTKXMLMultiblockLODReader - and local example
2 parents 4b7c4d7 + 8173e5d commit 3151526

34 files changed

Lines changed: 3560 additions & 0 deletions

Applications/HAI/CMakeLists.txt

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
###########################################################################
2+
#
3+
# Library: MSVTK
4+
#
5+
# Copyright (c) Kitware Inc.
6+
#
7+
# Licensed under the Apache License, Version 2.0 (the "License");
8+
# you may not use this file except in compliance with the License.
9+
# You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0.txt
12+
#
13+
# Unless required by applicable law or agreed to in writing, software
14+
# distributed under the License is distributed on an "AS IS" BASIS,
15+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
# See the License for the specific language governing permissions and
17+
# limitations under the License.
18+
#
19+
###########################################################################
20+
21+
set(KIT HAI)
22+
project(msv${KIT})
23+
24+
# --------------------------------------------------------------------------
25+
# Sources
26+
# --------------------------------------------------------------------------
27+
28+
set(msv${KIT}_SRCS
29+
msvQHAIMainWindow.cxx
30+
msvQHAIAboutDialog.cxx
31+
)
32+
33+
set(msv${KIT}_MOC_SRCS
34+
msvQHAIMainWindow.h
35+
msvQHAIAboutDialog.h
36+
)
37+
38+
set(msv${KIT}_UI_SRCS
39+
Resources/UI/msvQHAIMainWindow.ui
40+
Resources/UI/msvQHAIAboutDialog.ui
41+
)
42+
43+
set(msv${KIT}_QRC
44+
Resources/msvQHAI.qrc
45+
)
46+
47+
QT4_WRAP_CPP(msv${KIT}_SRCS ${msv${KIT}_MOC_SRCS})
48+
QT4_WRAP_UI(msv${KIT}_UI_CXX ${msv${KIT}_UI_SRCS})
49+
QT4_ADD_RESOURCES(msv${KIT}_QRC_SRCS ${msv${KIT}_QRC})
50+
51+
# --------------------------------------------------------------------------
52+
# Include dirs
53+
# --------------------------------------------------------------------------
54+
55+
set(include_dirs
56+
${CMAKE_CURRENT_BINARY_DIR}
57+
${CMAKE_CURRENT_SOURCE_DIR}
58+
${MSVTK_INCLUDE_DIRS}
59+
${VTK_INCLUDE_DIRS}
60+
${CTK_INCLUDE_DIRS}
61+
${msvVTKParallel_INCLUDE_DIRS}
62+
${msvVTKWidgets_INCLUDE_DIRS}
63+
${msvQtWidgets_INCLUDE_DIRS}
64+
)
65+
66+
include_directories(${include_dirs})
67+
68+
# --------------------------------------------------------------------------
69+
# Build the library so it can be tested in Testing/Cpp.
70+
# --------------------------------------------------------------------------
71+
72+
add_library(msv${KIT}
73+
${msv${KIT}_SRCS}
74+
${msv${KIT}_UI_CXX}
75+
${msv${KIT}_QRC_SRCS}
76+
)
77+
78+
target_link_libraries(msv${KIT}
79+
${MSVTK_LIBRARIES}
80+
${CTK_LIBRARIES}
81+
${VTK_LIBRARIES}
82+
msvVTKParallel
83+
msvVTKWidgets
84+
msvQtWidgets
85+
)
86+
87+
install(TARGETS msv${KIT}
88+
RUNTIME DESTINATION ${MSVTK_INSTALL_BIN_DIR} COMPONENT RuntimeLibraries
89+
LIBRARY DESTINATION ${MSVTK_INSTALL_LIB_DIR} COMPONENT RuntimeLibraries
90+
ARCHIVE DESTINATION ${MSVTK_INSTALL_LIB_DIR} COMPONENT Development
91+
)
92+
93+
# --------------------------------------------------------------------------
94+
# Build the executable
95+
# --------------------------------------------------------------------------
96+
97+
add_executable(${KIT}
98+
hai.cxx
99+
)
100+
set_target_properties(${KIT} PROPERTIES OUTPUT_NAME hai)
101+
102+
target_link_libraries(${KIT}
103+
msv${KIT}
104+
)
105+
106+
#-----------------------------------------------------------------------------
107+
# Configure
108+
# --------------------------------------------------------------------------
109+
set(MY_LIBRARY_EXPORT_DIRECTIVE "MSV_${KIT}_EXPORT")
110+
set(MY_EXPORT_HEADER_PREFIX MSV_${KIT})
111+
set(MY_LIBNAME ${PROJECT_NAME})
112+
113+
configure_file(
114+
${MSVTK_SOURCE_DIR}/CMake/msvExport.h.in
115+
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Export.h
116+
)
117+
118+
set(dynamicHeaders
119+
"${dynamicHeaders};${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Export.h")
120+
121+
# --------------------------------------------------------------------------
122+
# Testing
123+
#
124+
if(BUILD_TESTING)
125+
add_subdirectory(Testing)
126+
endif()
127+
128+
# --------------------------------------------------------------------------
129+
# Install
130+
# --------------------------------------------------------------------------
131+
if(NOT PACKAGE_WITH_BUNDLE)
132+
set(${KIT}_INSTALL_DESTINATION_ARGS RUNTIME DESTINATION ${MSVTK_INSTALL_BIN_DIR})
133+
else()
134+
set(${KIT}_INSTALL_DESTINATION_ARGS RUNTIME DESTINATION ".")
135+
endif()
136+
137+
install(TARGETS ${KIT}
138+
${${KIT}_INSTALL_DESTINATION_ARGS}
139+
COMPONENT Runtime)
25.7 KB
Loading
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<ui version="4.0">
3+
<class>msvQHAIAboutDialog</class>
4+
<widget class="QDialog" name="msvQHAIAboutDialog">
5+
<property name="geometry">
6+
<rect>
7+
<x>0</x>
8+
<y>0</y>
9+
<width>595</width>
10+
<height>518</height>
11+
</rect>
12+
</property>
13+
<property name="windowTitle">
14+
<string>About MSV HAI Application</string>
15+
</property>
16+
<layout class="QVBoxLayout" name="verticalLayout">
17+
<property name="spacing">
18+
<number>0</number>
19+
</property>
20+
<property name="margin">
21+
<number>0</number>
22+
</property>
23+
<item>
24+
<widget class="QLabel" name="msvQHAILabel">
25+
<property name="pixmap">
26+
<pixmap resource="../msvQHAI.qrc">:/Logo/msv-logo.png</pixmap>
27+
</property>
28+
<property name="scaledContents">
29+
<bool>true</bool>
30+
</property>
31+
<property name="alignment">
32+
<set>Qt::AlignCenter</set>
33+
</property>
34+
</widget>
35+
</item>
36+
<item>
37+
<widget class="QTextEdit" name="CreditsTextEdit">
38+
<property name="readOnly">
39+
<bool>true</bool>
40+
</property>
41+
<property name="html">
42+
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
43+
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
44+
p, li { white-space: pre-wrap; }
45+
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
46+
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:11pt;&quot;&gt;MSVTK Library&lt;br /&gt;Copyright (c) Kitware Inc. &lt;/span&gt;&lt;/p&gt;
47+
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:11pt;&quot;&gt;VTK &lt;/span&gt;&lt;a href=&quot;http://www.vtk.org/copyright.php&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:11pt; text-decoration: underline; color:#0000ff;&quot;&gt;http://www.vtk.org/copyright.php&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:11pt;&quot;&gt; &lt;br /&gt;CTK &lt;/span&gt;&lt;a href=&quot;https://github.com/commontk/CTK/blob/master/LICENSE&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:11pt; text-decoration: underline; color:#0000ff;&quot;&gt;https://github.com/commontk/CTK/blob/master/LICENSE&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:11pt;&quot;&gt; &lt;/span&gt;&lt;/p&gt;
48+
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Ubuntu'; font-size:11pt;&quot;&gt;The application has been written by Julien Finet and Michael Jeulin-Lagarrigue.&lt;br /&gt;Funding for this work comes from the European Commission within the MSV project (FP7-IST-248032)&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
49+
</property>
50+
</widget>
51+
</item>
52+
<item>
53+
<widget class="QDialogButtonBox" name="buttonBox">
54+
<property name="orientation">
55+
<enum>Qt::Horizontal</enum>
56+
</property>
57+
<property name="standardButtons">
58+
<set>QDialogButtonBox::Ok</set>
59+
</property>
60+
<property name="centerButtons">
61+
<bool>true</bool>
62+
</property>
63+
</widget>
64+
</item>
65+
</layout>
66+
</widget>
67+
<resources>
68+
<include location="../msvQHAI.qrc"/>
69+
<include location="../msvQHAI.qrc"/>
70+
</resources>
71+
<connections>
72+
<connection>
73+
<sender>buttonBox</sender>
74+
<signal>accepted()</signal>
75+
<receiver>msvQHAIAboutDialog</receiver>
76+
<slot>accept()</slot>
77+
<hints>
78+
<hint type="sourcelabel">
79+
<x>248</x>
80+
<y>254</y>
81+
</hint>
82+
<hint type="destinationlabel">
83+
<x>157</x>
84+
<y>274</y>
85+
</hint>
86+
</hints>
87+
</connection>
88+
<connection>
89+
<sender>buttonBox</sender>
90+
<signal>rejected()</signal>
91+
<receiver>msvQHAIAboutDialog</receiver>
92+
<slot>reject()</slot>
93+
<hints>
94+
<hint type="sourcelabel">
95+
<x>316</x>
96+
<y>260</y>
97+
</hint>
98+
<hint type="destinationlabel">
99+
<x>286</x>
100+
<y>274</y>
101+
</hint>
102+
</hints>
103+
</connection>
104+
</connections>
105+
</ui>
Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<ui version="4.0">
3+
<class>msvQHAIMainWindow</class>
4+
<widget class="QMainWindow" name="msvQHAIMainWindow">
5+
<property name="geometry">
6+
<rect>
7+
<x>0</x>
8+
<y>0</y>
9+
<width>800</width>
10+
<height>600</height>
11+
</rect>
12+
</property>
13+
<property name="windowTitle">
14+
<string>HAI - Multi Scale Visualization Toolkit</string>
15+
</property>
16+
<widget class="QWidget" name="centralwidget">
17+
<layout class="QVBoxLayout" name="verticalLayout_3" stretch="1">
18+
<property name="margin">
19+
<number>0</number>
20+
</property>
21+
<item>
22+
<widget class="QVTKWidget" name="threeDView" native="true"/>
23+
</item>
24+
</layout>
25+
</widget>
26+
<widget class="QMenuBar" name="menubar">
27+
<property name="geometry">
28+
<rect>
29+
<x>0</x>
30+
<y>0</y>
31+
<width>800</width>
32+
<height>21</height>
33+
</rect>
34+
</property>
35+
<widget class="QMenu" name="menuFile">
36+
<property name="title">
37+
<string>File</string>
38+
</property>
39+
<addaction name="actionOpen"/>
40+
<addaction name="actionClose"/>
41+
<addaction name="actionExit"/>
42+
</widget>
43+
<widget class="QMenu" name="menuHelp">
44+
<property name="title">
45+
<string>Help</string>
46+
</property>
47+
<addaction name="actionAboutHAIApplication"/>
48+
</widget>
49+
<addaction name="menuFile"/>
50+
<addaction name="menuHelp"/>
51+
</widget>
52+
<widget class="QDockWidget" name="haiReviewPanel">
53+
<property name="allowedAreas">
54+
<set>Qt::LeftDockWidgetArea|Qt::RightDockWidgetArea</set>
55+
</property>
56+
<attribute name="dockWidgetArea">
57+
<number>2</number>
58+
</attribute>
59+
<widget class="QWidget" name="dockWidgetContents_3">
60+
<layout class="QVBoxLayout" name="verticalLayout">
61+
<property name="margin">
62+
<number>0</number>
63+
</property>
64+
<item>
65+
<widget class="QComboBox" name="lodComboBox">
66+
<item>
67+
<property name="text">
68+
<string>LOD #0</string>
69+
</property>
70+
</item>
71+
<item>
72+
<property name="text">
73+
<string>LOD #1</string>
74+
</property>
75+
</item>
76+
<item>
77+
<property name="text">
78+
<string>LOD #2</string>
79+
</property>
80+
</item>
81+
</widget>
82+
</item>
83+
<item>
84+
<widget class="QTreeWidget" name="organsTreeWidget">
85+
<property name="selectionMode">
86+
<enum>QAbstractItemView::ExtendedSelection</enum>
87+
</property>
88+
<column>
89+
<property name="text">
90+
<string notr="true">1</string>
91+
</property>
92+
</column>
93+
</widget>
94+
</item>
95+
</layout>
96+
</widget>
97+
</widget>
98+
<action name="actionOpen">
99+
<property name="text">
100+
<string>Open...</string>
101+
</property>
102+
<property name="shortcut">
103+
<string>Ctrl+O</string>
104+
</property>
105+
<property name="iconVisibleInMenu">
106+
<bool>true</bool>
107+
</property>
108+
</action>
109+
<action name="actionExit">
110+
<property name="text">
111+
<string>Exit</string>
112+
</property>
113+
<property name="shortcut">
114+
<string>Ctrl+Q</string>
115+
</property>
116+
</action>
117+
<action name="actionClose">
118+
<property name="text">
119+
<string>Close</string>
120+
</property>
121+
<property name="shortcut">
122+
<string>Ctrl+X</string>
123+
</property>
124+
</action>
125+
<action name="actionAboutHAIApplication">
126+
<property name="text">
127+
<string>About HAI Application</string>
128+
</property>
129+
<property name="iconVisibleInMenu">
130+
<bool>true</bool>
131+
</property>
132+
</action>
133+
</widget>
134+
<customwidgets>
135+
<customwidget>
136+
<class>QVTKWidget</class>
137+
<extends>QWidget</extends>
138+
<header>QVTKWidget.h</header>
139+
<container>1</container>
140+
</customwidget>
141+
</customwidgets>
142+
<resources/>
143+
<connections/>
144+
</ui>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<!DOCTYPE RCC><RCC version="1.0">
2+
<qresource>
3+
<file>Logo/msv-logo.png</file>
4+
</qresource>
5+
</RCC>

0 commit comments

Comments
 (0)