Skip to content

Commit

Permalink
Cliniface version 4.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
richeytastic committed Sep 21, 2019
1 parent 7548d22 commit 76d3ba2
Show file tree
Hide file tree
Showing 43 changed files with 1,192 additions and 643 deletions.
107 changes: 48 additions & 59 deletions CMakeLists.txt
Expand Up @@ -17,8 +17,8 @@ set( APP_SOURCE "https://github.com/frontiersi/${PROJECT_NAME}/releases")
# C: APP_VERSION_PATCH - Bug fixes and/or minor changes to how existing features are implemented.
# D: APP_BUILD_DTSTAMP - Date-time stamp of build (coordinated universal time).
set( APP_VERSION_MAJOR 4)
set( APP_VERSION_MINOR 0)
set( APP_VERSION_PATCH 2)
set( APP_VERSION_MINOR 1)
set( APP_VERSION_PATCH 0)
string( TIMESTAMP APP_BUILD_DTSTAMP "%y%m%d" UTC)
set( APP_VERSION_STRING "${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}.${APP_VERSION_PATCH}.${APP_BUILD_DTSTAMP}")

Expand Down Expand Up @@ -108,16 +108,16 @@ add_executable( ${PROJECT_NAME}

set_property( TARGET ${PROJECT_NAME} PROPERTY WIN32_EXECUTABLE true)

set( _bin_dir "${PROJECT_BINARY_DIR}/bin")
set_target_properties( ${PROJECT_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${_bin_dir}")
file( MAKE_DIRECTORY "${_bin_dir}/${_data}")
set( _bindir "${PROJECT_BINARY_DIR}/bin")
set_target_properties( ${PROJECT_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${_bindir}")
file( MAKE_DIRECTORY "${_bindir}/${_data}")

# On Windows, there's no RPATH so we must collect all the DLLs and place into the project binary dir.
# Note that ExeInstall.cmake does also include LinkTargets.cmake for UNIX!
include( "$ENV{DEV_PARENT_DIR}/libbuild/cmake/ExeInstall.cmake")

# Copy across license
file( COPY "${PROJECT_SOURCE_DIR}/LICENSE" DESTINATION "${_bin_dir}")
file( COPY "${PROJECT_SOURCE_DIR}/LICENSE" DESTINATION "${_bindir}")

# Extract the examples archive into the build location.
if ( NOT EXISTS "${PROJECT_BINARY_DIR}/examples")
Expand All @@ -126,27 +126,27 @@ if ( NOT EXISTS "${PROJECT_BINARY_DIR}/examples")
endif()

# Extract the IDTFConverter tool (for U3D export) into the build binary directory
if ( NOT EXISTS "${_bin_dir}/${_u3dIntel}")
message( STATUS "Extracting ${_u3dIntel}.tgz to ${_bin_dir}/${_u3dIntel}")
execute_process( COMMAND ${CMAKE_COMMAND} -E tar xzf "${PROJECT_SOURCE_DIR}/${_u3dIntel}.tgz" WORKING_DIRECTORY "${_bin_dir}")
if ( NOT EXISTS "${_bindir}/${_u3dIntel}")
message( STATUS "Extracting ${_u3dIntel}.tgz to ${_bindir}/${_u3dIntel}")
execute_process( COMMAND ${CMAKE_COMMAND} -E tar xzf "${PROJECT_SOURCE_DIR}/${_u3dIntel}.tgz" WORKING_DIRECTORY "${_bindir}")
endif()

# Extract the face detection models to the build binary data directory
if ( NOT EXISTS "${_bin_dir}/${_faceModelsDir}")
message( STATUS "Extracting facemodels.tgz to ${_bin_dir}/${_faceModelsDir}")
execute_process( COMMAND ${CMAKE_COMMAND} -E tar xzf "${PROJECT_SOURCE_DIR}/facemodels.tgz" WORKING_DIRECTORY "${_bin_dir}/${_data}")
if ( NOT EXISTS "${_bindir}/${_faceModelsDir}")
message( STATUS "Extracting facemodels.tgz to ${_bindir}/${_faceModelsDir}")
execute_process( COMMAND ${CMAKE_COMMAND} -E tar xzf "${PROJECT_SOURCE_DIR}/facemodels.tgz" WORKING_DIRECTORY "${_bindir}/${_data}")
endif()

# On Linux, we assume that there's a valid installation of pdflatex on the path (though extra packages may be needed at runtime).
if ( WIN32 AND NOT EXISTS "${_bin_dir}/texmfs")
message( STATUS "Extracting texmfs.tgz to ${_bin_dir}/texmfs")
execute_process( COMMAND ${CMAKE_COMMAND} -E tar xzf "${PROJECT_SOURCE_DIR}/texmfs.tgz" WORKING_DIRECTORY "${_bin_dir}")
if ( WIN32 AND NOT EXISTS "${_bindir}/texmfs")
message( STATUS "Extracting texmfs.tgz to ${_bindir}/texmfs")
execute_process( COMMAND ${CMAKE_COMMAND} -E tar xzf "${PROJECT_SOURCE_DIR}/texmfs.tgz" WORKING_DIRECTORY "${_bindir}")
endif()

# Copy over plugins to bin/plugins, and copy over data to bin/data
set( _pluginsDir "${PROJECT_BINARY_DIR}/../plugins/${CMAKE_BUILD_TYPE}/lib") # e.g. ~/lb/Cliniface/plugins/Release/lib
add_custom_target( a1 ALL COMMAND ${CMAKE_COMMAND} -E copy_directory ${_pluginsDir} ${_bin_dir}/plugins COMMENT "Copying over plugins to bin")
add_custom_target( a2 ALL COMMAND ${CMAKE_COMMAND} -E copy_directory ${PROJECT_SOURCE_DIR}/${_data} ${_bin_dir}/${_data} COMMENT "Copying over data")
add_custom_target( a1 ALL COMMAND ${CMAKE_COMMAND} -E copy_directory ${_pluginsDir} ${_bindir}/plugins COMMENT "Copying over plugins to bin")
add_custom_target( a2 ALL COMMAND ${CMAKE_COMMAND} -E copy_directory ${PROJECT_SOURCE_DIR}/${_data} ${_bindir}/${_data} COMMENT "Copying over data")

# Copy over the HTML directory
add_custom_target( a3 ALL COMMAND ${CMAKE_COMMAND} -E copy_directory ${PROJECT_SOURCE_DIR}/${_html} ${PROJECT_BINARY_DIR}/${_html} COMMENT "Copying over html")
Expand All @@ -158,11 +158,8 @@ if ( WIN32)
message( WARNING "Cannot find QtInstallerFramework tools! Looked in ${QT_INSTALLER_FRAMEWORK}")
else()
set( APP_ADMIN_TARGET_DIR "@ApplicationsDirX64@/${APP_NAME}")
set( APP_TARGET_DIR "@HomeDir@/${APP_NAME}")
set( APP_RUN_PROGRAM "@TargetDir@/bin/${APP_NAME}")
set( APP_REPO_0 "https://crc-si.github.io/${PROJECT_NAME}/repo")
set( APP_REPO_0_TXT "Main ${APP_NAME} Repository")
set( APP_REPO_0_ENBLD 1)
set( APP_TARGET_DIR "@HomeDir@/${APP_NAME}")
string( TIMESTAMP APP_RELEASE_DATE "%Y-%m-%d" UTC)

set( _config "config")
Expand All @@ -172,45 +169,31 @@ if ( WIN32)
set( _rootPackageXML "${_packageRoot}/meta/package.xml")

# Copy over the base directory structure for the config and packages folders from the source directory.
#install( DIRECTORY "install/windows/" DESTINATION "${PROJECT_BINARY_DIR}" PATTERN "*.py" EXCLUDE PATTERN "*.xml.in" EXCLUDE)
install( DIRECTORY "install/windows/" DESTINATION "${CMAKE_INSTALL_PREFIX}" PATTERN "*.py" EXCLUDE PATTERN "*.xml.in" EXCLUDE)

# Configure the required package installer configuration files
configure_file( "install/windows/${_rootPackageXML}.in" "${CMAKE_INSTALL_PREFIX}/${_rootPackageXML}")
configure_file( "install/windows/${_configXML}.in" "${CMAKE_INSTALL_PREFIX}/${_configXML}")

# Create the package directories with required structure
# The package directories to install into
set( _packageRootData "${_packageRoot}/data")
set( _packageHTMLData "${_packageRoot}.html/data")
set( _packageTexmfsData "${_packageRoot}.texmfs/data")
set( _packagePluginsData "${_packageRoot}.plugins/data")
set( _packageTexmfsData "${_packageRoot}.texmfs/data/bin")
set( _packagePluginsData "${_packageRoot}.plugins/data/bin")
set( _packageExamplesData "${_packageRoot}.examples/data")

install( DIRECTORY DESTINATION "${CMAKE_INSTALL_PREFIX}/${_packageRootData}")
install( DIRECTORY DESTINATION "${CMAKE_INSTALL_PREFIX}/${_packageHTMLData}")
install( DIRECTORY DESTINATION "${CMAKE_INSTALL_PREFIX}/${_packageTexmfsData}")
install( DIRECTORY DESTINATION "${CMAKE_INSTALL_PREFIX}/${_packagePluginsData}")
install( DIRECTORY DESTINATION "${CMAKE_INSTALL_PREFIX}/${_packageExamplesData}")
set( _packagePluginsData "${_packagePluginsData}/bin")
set( _packageTexmfsData "${_packageTexmfsData}/bin")
install( DIRECTORY DESTINATION "${CMAKE_INSTALL_PREFIX}/${_packagePluginsData}")
install( DIRECTORY DESTINATION "${CMAKE_INSTALL_PREFIX}/${_packageTexmfsData}")

# Install the config and packages directories in the installation directory
#install( DIRECTORY "${PROJECT_BINARY_DIR}/${_config}" DESTINATION ".")
#install( DIRECTORY "${PROJECT_BINARY_DIR}/${_packages}" DESTINATION ".")

# Install the package data (note initial exclusion of u3dIntel - this is because it has its own Plugins directory)
install( DIRECTORY "${_bin_dir}" DESTINATION "${_packageRootData}" USE_SOURCE_PERMISSIONS
install( DIRECTORY "${_bindir}" DESTINATION "${_packageRootData}" USE_SOURCE_PERMISSIONS
PATTERN "${_u3dIntel}" EXCLUDE
PATTERN "plugins/*" EXCLUDE
PATTERN "texmfs" EXCLUDE)
install( DIRECTORY "${_bin_dir}/${_u3dIntel}" DESTINATION "${_packageRootData}/bin" USE_SOURCE_PERMISSIONS)
install( DIRECTORY "${_bin_dir}/plugins" DESTINATION "${_packagePluginsData}" USE_SOURCE_PERMISSIONS)
install( DIRECTORY "${_bindir}/${_u3dIntel}" DESTINATION "${_packageRootData}/bin" USE_SOURCE_PERMISSIONS)
install( DIRECTORY "${_bindir}/plugins" DESTINATION "${_packagePluginsData}" USE_SOURCE_PERMISSIONS)
install( DIRECTORY "${PROJECT_BINARY_DIR}/examples" DESTINATION "${_packageExamplesData}" USE_SOURCE_PERMISSIONS)
install( DIRECTORY "${PROJECT_BINARY_DIR}/${_html}" DESTINATION "${_packageHTMLData}" USE_SOURCE_PERMISSIONS)

# Install texmfs on Windows
install( DIRECTORY "${_bin_dir}/texmfs" DESTINATION "${_packageTexmfsData}" USE_SOURCE_PERMISSIONS)
# Install texmfs
install( DIRECTORY "${_bindir}/texmfs" DESTINATION "${_packageTexmfsData}" USE_SOURCE_PERMISSIONS)

# Run the Qt installer framework binary generator tool
set( _flags "-v --offline-only")
Expand All @@ -219,29 +202,35 @@ if ( WIN32)
WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX})")
endif()
elseif(UNIX)
# For Linux, we use linuxdeploy to create an AppDir then the appimagetol to create an AppImage deployable.
set( _linuxdeploy "linuxdeploy-x86_64.AppImage")
set( _appimagetool "appimagetool-x86_64.AppImage")
#add_custom_target( a5 ALL COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_INSTALL_PREFIX}/AppDir COMMENT "Cleaning prior to install")
# For some reason, the cliniface ELF needs libQt5X11Extras.so set as needed
install( CODE "execute_process( COMMAND patchelf --add-needed libQt5X11Extras.so ${_bindir}/${PROJECT_NAME})")

# Copy across the AppDir directory structure to the install directory
install( DIRECTORY "${PROJECT_SOURCE_DIR}/install/linux/AppDir" DESTINATION ${CMAKE_INSTALL_PREFIX} USE_SOURCE_PERMISSIONS)
set( _appdir "${CMAKE_INSTALL_PREFIX}/AppDir")

# Copy across the built binary directory.
install( DIRECTORY ${_bin_dir} DESTINATION "${_appdir}/usr" USE_SOURCE_PERMISSIONS)

install( DIRECTORY ${_bindir} DESTINATION "${_appdir}/usr" USE_SOURCE_PERMISSIONS)
# Copy across the examples directory.
install( DIRECTORY "${PROJECT_BINARY_DIR}/examples" DESTINATION "${_appdir}/usr" USE_SOURCE_PERMISSIONS)

# Copy across the html directory.
install( DIRECTORY "${PROJECT_BINARY_DIR}/${_html}" DESTINATION "${_appdir}/usr" USE_SOURCE_PERMISSIONS)

# Generate the AppDir bundle using linuxdeploy
# NB ENSURE THAT LD_LIBRARY_PATH IS SET CORRECTLY TO FIND THE CORRECT LIBRARIES NEEDED!
install( CODE "execute_process( COMMAND ${_linuxdeploy} --appdir=${_appdir}
--executable=${_bin_dir}/${PROJECT_NAME}
--desktop-file=${PROJECT_SOURCE_DIR}/install/linux/${PROJECT_NAME}.desktop
--icon-file=${PROJECT_SOURCE_DIR}/install/linux/${PROJECT_NAME}.png
WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX})")
install( CODE "execute_process( COMMAND ${_appimagetool} ${_appdir}
# Make an AppDir with all the Qt libraries
# NB ENSURE THAT LD_LIBRARY_PATH IS SET CORRECTLY TO FIND ALL LIBRARIES NEEDED!
set( _linuxdeployqt "linuxdeployqt-x86_64.AppImage")
install( CODE "execute_process( COMMAND ${_linuxdeployqt}
${_appdir}/usr/share/applications/${PROJECT_NAME}.desktop
-qmake=$ENV{QT5}/bin/qmake
-bundle-non-qt-libs
-no-translations
-verbose=2
WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX})")

# The wrong user permissions are set on the AppDir by default!
install( CODE "execute_process( COMMAND chmod -Rc 755 ${_appdir})")

# Make the AppImage itself from the AppDir
set( _appimagetool "appimagetool-x86_64.AppImage")
install( CODE "execute_process( COMMAND ${_appimagetool} -n ${_appdir})")
endif()
13 changes: 5 additions & 8 deletions bugs.md
@@ -1,17 +1,14 @@
### 4.0.1
- When model slicing, extra vertices are added resulting in the creation of holes / extra manifolds (use patch.ply).
- Weird rendering issue on right/left viewers sometimes (Windows only?).
Could be a VTK bug - investigate with later versions of VTK when available.

- ObjModelSurfaceCurveFinder fails sometimes (use patch2.3df).
- ObjModelSurfacePlanePathFinder doesn't work properly.

### 4.0.0
- vtkCubeAxesActor fails to initialise properly on viewers at start.
- vtkCubeAxesActor fails to initialise properly on viewers at start (or small text).
- Occasional graphical corruption on scalar views when copying/moving between viewers (fix by toggling scalar mapping view).
- When merging view from centre to left/right AND no other views in centre, then remove view to centre and close left/right viewer.
- pdflatex doesn't run if installed in system dir (permissions?)
- Widget bounding box around scalar mapping key appears sometimes.
- Widget bounding box around scalar mapping key appears sometimes (confirm).

### 3.1.0 (all to be reconfirmed)
- Copying when radial select visualisation active doesn't apply visualisation correctly.
- Metric caption (bottom left) disappearing when moving between landmarks and metric visualisations.
- If surface curvature visualisation applied, then reapply after model surface changed (e.g. by smooth).

28 changes: 28 additions & 0 deletions changes.md
@@ -1,3 +1,31 @@
#### 4.1.0
- Updated desktop categories for Linux AppImage version.
- Modified implementation of ICP - now faster and more accurate.
- Link to examples in $HOME/.clinface directory now set dynamically (removed on exit).
- Increased size of world axes grid.
- Changed to OpenCV 3.2 on Windows for consistency with Linux (also on 3.2).
- Path handle, landmarks, and radial selection handle coordinates now shown in status bar.
- Improved robustness of initial face/landmark detection.
- Model movement now propogates between viewers (when multiple views of the same model are open).
- Model views now prefer to place themselves on the centre viewer after merging or closing models.
- Different colours for polygon and vertex labels.
- Modified Windows installer to allow existing installations to be overwritten.
- Fixed undo/redo bug where state restoration was being performed on the selected model.
- Fixed incomplete restoration of model geometry after undo.
- Fixed render flicker when opening context menu.

#### 4.0.3
- Cliniface now stores all user data in the .cliniface directory inside user's home directory.
- Created secondary location from which plugins can be loaded (from $HOME/.cliniface/plugins).
- Symlink to examples now always located at $HOME/.cliniface/examples.
- Renamed core platform plugin 'symmetry' to 'asymmetry'.
- Removed setting of unused mask path string in preferences.
- Update plugins documentation.

#### 4.0.2
- Added polygon labels visualisation.
- Some minor bug fixes concerning the accuracy of surface point placement.

#### 4.0.1
- Fixed corruption of scalar map upon mirror reflecting the model.
- Fixed rounding errors in surface point finding and point triangle membership routines.
Expand Down
1 change: 1 addition & 0 deletions html/index.html
Expand Up @@ -40,6 +40,7 @@ <h3>
<li><a href="fileformats.html">File Formats</a></li>
<li><a href="plugins.html">Plugins</a></li>
<li><a href="research.html">Research</a></li>
<li><a href="trouble.html">Troubleshooting</a></li>
<li><a href="faqs.html">Frequently Asked Questions (FAQs)</a></li>
<li><a href="contact.html">Contact</a></li>
</ul>
Expand Down
4 changes: 3 additions & 1 deletion html/interface.html
Expand Up @@ -91,8 +91,10 @@ <h4>Show Custom Distances</h4>
<p>Toggle the visualisation of manually created distance measurements on and off.</p>
<h4 id="radial_select">Select Radial Area</h4>
<p>Interactively select a region around a point. Use in combination with the <a href="#cropping_tool">cropping tool</a> to remove entraneous regions of the model. Click and drag the centre handle to move the region around the model and use forwards and backwards on the mouse wheel to change the radial size of the region.</p>
<h4>Polygon Labels</h4>
<p>Turn on and off the individual polygon identifiers (useful when debugging plugins).</p>
<h4>Vertex Labels</h4>
<p>Turn on and off the individual vertex identifiers (used when debugging plugins).</p>
<p>Turn on and off the individual vertex identifiers (useful when debugging plugins).</p>
<h4>Backface Culling</h4>
<p>When turned on, the inside facing surface of the model is not rendered. This is switched on automatically after automatically detecting the face. In some cases, the inside and outside surfaces of a model are incorrectly defined due to the ordering of vertices for each triangle. In this case Cliniface's <a href="geometry.html#normal_flipping">polygon normal inversion</a> tool can be used to swap the inside with the outside surface of the model.</p>
<h4>Show World Axes</h4>
Expand Down

0 comments on commit 76d3ba2

Please sign in to comment.