Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Synchro] branch 4.1 (dev) receives bugfix from 4.0.3 to 4.0.7 #876

Closed
wants to merge 20 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
5ea1169
[4.0.3] release with debugs from manips tests and switch to ub22 (#851)
mathildemerle May 15, 2024
b7a9df1
[4.0.4] TTK dll copy error in Windows package (#854)
mathildemerle May 30, 2024
b58bf3f
[Registration] cast data in LCC and Diffeo, enhance txt in Manual (#861)
mathildemerle Oct 17, 2024
62e5c24
[PolygonROI] rm shift-click, solve interactor style after repulsor, h…
mathildemerle Nov 19, 2024
63fdbf3
[VTK9.2.6] switch to more recent VTK and ITK5.4rc04 (#859)
mathildemerle Nov 19, 2024
6363bf9
Revert "[VTK9.2.6] switch to more recent VTK and ITK5.4rc04 (#859)" (…
mathildemerle Nov 22, 2024
350b1fb
[ReleaseNotes] update 4.0.6 for pipeline closing layers (#863)
mathildemerle Nov 25, 2024
58fe580
[VOICutter] fix output if no segmentation is done (#864)
mathildemerle Nov 25, 2024
ee151bd
[Release] 4.0.6 polygon roi fixes (#865)
mathildemerle Nov 25, 2024
3cc315f
[Release] 4.0.6 polygon roi fixes (#868)
mathildemerle Nov 25, 2024
a9b281d
Retrieve FilePath metadata, facilitate direct call to data import (#870)
fcollot Dec 9, 2024
9cc5aaa
Update RELEASE_NOTES.txt (#871)
fcollot Dec 10, 2024
54a2b7d
Create musicardio-macos.yml
mathildemerle Jan 14, 2025
fd1a3ac
Update musicardio-macos.yml -- macos13
mathildemerle Jan 14, 2025
c367277
Update musicardio-macos.yml -- libomp
mathildemerle Jan 14, 2025
743addc
Update musicardio-macos.yml -- libomp version
mathildemerle Jan 14, 2025
8f9bae0
[4.0.7] polygonroi shift-click + remove contour (#872)
mathildemerle Jan 16, 2025
2c9c3a4
[GithubAction] macos, branch 4.1, dependencies, sending method (#873)
mathildemerle Jan 23, 2025
ba5b269
[4.0.7] changes of version number for description (#874)
mathildemerle Jan 28, 2025
cf6b1b6
[Paint] avoid non-needed code which can crash in processOutput method…
mathildemerle Jan 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
134 changes: 134 additions & 0 deletions .github/workflows/musicardio-macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
# This starter workflow is for a CMake project running on a single platform. There is a different starter workflow if you need cross-platform coverage.
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-multi-platform.yml
name: MUSICardio on macOS

on:
push:
branches: [ "4.1" ]
pull_request:
branches: [ "4.1" ]
workflow_dispatch:
inputs:
EXPIRATION_TIME:
description: 'Expiration time in month'
required: true
default: '12'
type: string
#schedule:
# - cron: '0 0 * * 1' # Each monday at 0h00, MIN HOUR DAY_IN_MONTH MONTH WEEK_DAY

env:
BUILD_TYPE: Release
QT5_DIR: "/usr/local/opt/qt@5/lib/cmake/Qt5"
MSC_SSH_PLUGINS: ${{ secrets.MSC_SSH_PLUGINS }}
MSC_TOKEN: ${{ secrets.MSC_TOKEN }}

jobs:
build:
# https://docs.github.com/en/actions/using-jobs/choosing-the-runner-for-a-job#standard-github-hosted-runners-for-public-repositories
runs-on: macos-13

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: 4.1

- name: Set up SSH
run: |
mkdir -p ~/.ssh
echo "$MSC_SSH_PLUGINS" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan github.com >> ~/.ssh/known_hosts

- name: Install dependencies
run: |
brew install qt@5
brew install boost
brew install swig
brew install libomp
echo "OpenMP_ROOT=$(brew --prefix libomp)" >> $GITHUB_ENV
pip3 install dmgbuild
# brew info cmake

- name: Set default EXPIRATION_TIME if not provided (with non manual workflow)
run: echo "EXPIRATION_TIME=${{ inputs.EXPIRATION_TIME || '12' }}" >> $GITHUB_ENV

- name: Configure CMake
run: |
cmake -B ${{github.workspace}}/build \
-DUSE_GITHUB_SSH:BOOL=TRUE \
-DmedInria_BUILD_TYPE:STRING=$BUILD_TYPE \
-Dmusic-plugins_BUILD_TYPE:STRING=$BUILD_TYPE \
-DEP_CHECKBOX_CUSTOM_DIRS:BOOL=ON \
-DEP_CHECKBOX_ON_TOP_LEVEL:BOOL=OFF \
-DEP_CHECKBOX_SIDE_BY_SIDE:BOOL=OFF \
-DQt5_DIR=$QT5_DIR \
-DOpenMP_ROOT=$OpenMP_ROOT \
-DUSE_FFmpeg=ON \
-DEXPIRATION_TIME:STRING=$EXPIRATION_TIME \
-DUSE_RealTimeWorkspace=OFF

- name: Build
run: |
CORES_TO_USE=$(($(sysctl -n hw.ncpu) - 1)) # Limit the number of used core otherwise the compilation crashes sometimes
echo "Using $CORES_TO_USE cores for the build"
cmake --build ${{github.workspace}}/build --config $BUILD_TYPE --parallel $CORES_TO_USE

- name: Package
run: |
cd ${{github.workspace}}/build
cpack -C $BUILD_TYPE

- name: Prepare DMG and update design
run: |
cd ${{github.workspace}}/build
dmg=$(ls *.dmg)
echo "The current package to adapt: $dmg"

if [ -n "$dmg" ]; then
# Attach to read-write format and retrieve mount path
path=$(hdiutil attach -owners on $dmg -shadow | grep -i 'Volumes' | cut -f 3)
echo "The current path: $path"

# Navigate to correct directory
cd "$path/MUSICardio.app/Contents/"

pathPluginsLegacy="${{github.workspace}}/build/medInria-build/bin/plugins_legacy"

# Change library paths for plugins
for f in PlugIns/*.dylib; do
install_name_tool -change $pathPluginsLegacy/libAAMeshInteractorPlugin.dylib @executable_path/../PlugIns/libAAMeshInteractorPlugin.dylib $f
install_name_tool -change $pathPluginsLegacy/libAAAMeshUtilityPlugin.dylib @executable_path/../PlugIns/libAAAMeshUtilityPlugin.dylib $f
install_name_tool -change $pathPluginsLegacy/libAAAmedPipelinePlugin.dylib @executable_path/../PlugIns/libAAAmedPipelinePlugin.dylib $f
install_name_tool -change $pathPluginsLegacy/libmscPipelinesPlugin.dylib @executable_path/../PlugIns/libmscPipelinesPlugin.dylib $f
install_name_tool -change $pathPluginsLegacy/libAAAEPMapPlugin.dylib @executable_path/../PlugIns/libAAAEPMapPlugin.dylib $f
install_name_tool -change $pathPluginsLegacy/libAAMFSSimulationPlugin.dylib @executable_path/../PlugIns/libAAMFSSimulationPlugin.dylib $f
install_name_tool -change $pathPluginsLegacy/libFEMForwardProblemPlugin.dylib @executable_path/../PlugIns/libFEMForwardProblemPlugin.dylib $f
done

# Go back to original path
cd "${{github.workspace}}/build"

# Update dmg design
echo "### Now we are going to update the dmg design"
volumeName=$(basename "$path")
dmgbuild -s ../packaging/apple/settings.json "$volumeName" MUSICardio.dmg

echo "End of the processes"
else
echo "A problem happened in MSC compilation, no dmg is built"
fi

- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_name: Inria-Asclepios/msc_binaries
# A personal access token for the GitHub repository in which the release will be created and edited.
# It is recommended to create the access token with the following scopes: `repo, user, admin:repo_hook`.
repo_token: ${{ secrets.MSC_TOKEN }}
file: ${{github.workspace}}/build/MUSICardio.dmg
asset_name: MUSICardio.dmg
tag: latest
overwrite: true
body: "MUSICardio binaries"
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ endif()
cmake_policy(SET CMP0074 NEW)

if(NOT DEFINED ${MEDINRIA_SUPERBUILD_VERSION})
set(MEDINRIA_SUPERBUILD_VERSION 4.0.2)
set(MEDINRIA_SUPERBUILD_VERSION 4.0.7)
endif()

SET(CMAKE_CXX_STANDARD 17)
Expand Down
30 changes: 30 additions & 0 deletions RELEASE_NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,33 @@
MUSICardio 4.0.7:
- PolygonROI:
* fix drawing a contour with shift-click to be able to change zoom/contrast with click.
* fix removing a last contour/node which reset the label tool and allow to draw again.
- Registration step in pipelines allows to use Mouse Interaction Toolbox.
- VOICutterToolBox fix a crash with metadata in pipelines sometimes if a cut has been made.

MUSICardio 4.0.6:
- Debug import of Carto .zip archives and .mesh files.
- PolygonROI: remove shift-click to draw, fix contrast after deactivation of repulsor and hide deactivated widgets.
- Pipelines:
* put back the possibility of closing layers at result steps,
* fix VOICutter if no segmentation is done,
* fix Histogram Analysis non manual algorithms.
* fix pipeline crash when saving data.

MUSICardio 4.0.5:
- Allow to use data with different size or spacing in LCCLogDemons and DiffeomorphicDemons.
- Manual Registration: enhance landmark numbers for better user understanding.
- Fix Histogram Analysis width problem displaying multi-results.

MUSICardio 4.0.4:
- Fix some plugins wrongly loaded on Windows.

MUSICardio 4.0.3:
- Switch to Ubuntu 22.
- PolygonROI: update icons, fix a glitch when users change ROI label, hide label panel in pipelines.
- Histogram Analysis: enhance memory management and remove useless computation.
- Pipelines: correct arithmetic filters computation.

MUSICardio 4.0.2:
- Fix drawing problem in pipelines with custom step of PolygonROI.

Expand Down
2 changes: 1 addition & 1 deletion packaging/apple/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"window": { "position": { "x": 100, "y": 100 },
"size": { "width": 640, "height": 300 } },
"contents": [
{ "x": 140, "y": 165, "type": "file", "path": "/Volumes/MUSICardio 4.0.2/MUSICardio.app" },
{ "x": 140, "y": 165, "type": "file", "path": "/Volumes/MUSICardio 4.0.7/MUSICardio.app" },
{ "x": 480, "y": 165, "type": "link", "path": "/Applications" }
]
}
4 changes: 3 additions & 1 deletion packaging/windows/WindowsPackaging.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ list(APPEND
${DCMTK_ROOT}/bin/Release
${VTK_ROOT}/bin/Release
${QtDCM_ROOT}/bin/Release
${TTK_ROOT}/bin/Release
${TTK_ROOT}/bin
${dtk_ROOT}/bin/Release
${RPI_ROOT}/bin/Release
${ZLIB_ROOT}/Release
Expand All @@ -121,12 +121,14 @@ file(GLOB_RECURSE itk_files LIST_DIRECTORIES true \"${ITK_ROOT}/bin/*.dll\")
file(GLOB_RECURSE vtk_files LIST_DIRECTORIES true \"${VTK_ROOT}/bin/*.dll\")
file(GLOB_RECURSE dtk_files LIST_DIRECTORIES true \"${dtk_ROOT}/bin/*.dll\")
file(GLOB_RECURSE dcm_files LIST_DIRECTORIES true \"${QtDCM_ROOT}/bin/*.dll\")
file(GLOB_RECURSE ttk_files LIST_DIRECTORIES true \"${TTK_DIR}/bin/*.dll\")
file(GLOB_RECURSE qt5_files LIST_DIRECTORIES true \"${QT_BINARY_DIR}/*.dll\")
file(GLOB_RECURSE zlib_files LIST_DIRECTORIES true \"${ZLIB_ROOT}/*.dll\")
list(APPEND files \${itk_files})
list(APPEND files \${vtk_files})
list(APPEND files \${dtk_files})
list(APPEND files \${dcm_files})
list(APPEND files \${ttk_files})
list(APPEND files \${qt5_files})
list(APPEND files \${zlib_files})

Expand Down
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
cmake_minimum_required(VERSION 3.19)

if(NOT DEFINED ${medInria_VERSION})
set(medInria_VERSION 4.0.2)
set(medInria_VERSION 4.0.7)
endif()

project(medInria VERSION ${medInria_VERSION})
Expand Down
6 changes: 4 additions & 2 deletions src/app/medInria/resources/medInria.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,10 @@
<file>pixmaps/radio-disabled.png</file>
<file>pixmaps/radio-checked-disabled.png</file>
<file>pixmaps/plus-button.png</file>
<file>pixmaps/plus.png</file>
<file>pixmaps/minus.png</file>
<file>pixmaps/plus_white.png</file>
<file>pixmaps/minus_white.png</file>
<file>pixmaps/plus_black.png</file>
<file>pixmaps/minus_black.png</file>
<file>pixmaps/checkbox-disabled.png</file>
<file>pixmaps/checkbox-checked-disabled.png</file>
<file>pixmaps/arrow-top-disabled.png</file>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/app/medInria/resources/pixmaps/plus_white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,7 @@ void medAbstractDatabaseImporter::importData()

// Now, populate the database
medDataIndex index = this->populateDatabaseAndGenerateThumbnails ( d->data, thumb_dir );
d->index = index;

if (d->data->hasMetaData(medMetaDataKeys::Toolbox.key()) &&
d->data->metadata(medMetaDataKeys::Toolbox.key())=="PolygonROI" &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ class MEDCORELEGACY_EXPORT medAbstractDatabaseImporter : public medJobItemL
const QUuid &uuid);
~medAbstractDatabaseImporter() override;

medDataIndex index(void) const;

signals:
/**
* This signal is emitted after a successful import/index.
Expand All @@ -74,7 +76,6 @@ public slots:
bool indexWithoutImporting ( void );
QMap<int, QString> volumeIdToImageFile ( void );
QString callerUuid ( void );
medDataIndex index(void) const;

void populateMissingMetadata ( medAbstractData* medData, const QString seriesDescription );
void addAdditionalMetaData ( medAbstractData* imData, QString aggregatedFileName, QStringList aggregatedFilesPaths );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ void medDatabasePersistentControllerPrivate::buildMetaDataLookup()
metaDataLookup.insert(medMetaDataKeys::StudyDate.key(),
TableEntryList() << TableEntry(T_study, "date"));
// Series Data
metaDataLookup.insert(medMetaDataKeys::FilePaths.key(),
TableEntryList() << TableEntry(T_series, "path"));
metaDataLookup.insert(medMetaDataKeys::Size.key(),
TableEntryList() << TableEntry(T_series, "size"));
metaDataLookup.insert(medMetaDataKeys::SeriesDescription.key(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ medAbstractData* medDatabaseReader::run()
QFileInfo fullThumbnailPathInfo(fullThumbnailPath);
medMetaDataKeys::SeriesThumbnail.add (medData, fullThumbnailPath);

medMetaDataKeys::FilePaths.set ( medData, seriesPath );
medMetaDataKeys::PatientID.set ( medData, patientId );
medMetaDataKeys::PatientName.set ( medData, patientName );
medMetaDataKeys::BirthDate.set ( medData, birthdate );
Expand Down
40 changes: 20 additions & 20 deletions src/layers/legacy/medImageIO/itkDCMTKImageIO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ DCMTKImageIO::DCMTKImageIO()
{
this->SetNumberOfDimensions(3);
this->SetNumberOfComponents(1);
this->SetPixelType(SCALAR);
this->SetComponentType(CHAR);
this->SetPixelType(IOPixelEnum::SCALAR);
this->SetComponentType(itk::IOComponentEnum::CHAR);

DcmRLEDecoderRegistration::registerCodecs();
DJDecoderRegistration::registerCodecs();
Expand Down Expand Up @@ -356,11 +356,11 @@ void DCMTKImageIO::DetermineNumberOfPixelComponents()

if( samplesPerPixel==1 )
{
this->SetPixelType ( SCALAR );
this->SetPixelType (itk::IOPixelEnum::SCALAR );
}
else
{
this->SetPixelType ( RGB );
this->SetPixelType ( itk::IOPixelEnum::RGB );
}
}

Expand All @@ -373,7 +373,7 @@ void DCMTKImageIO::DeterminePixelType()

if (condition.bad())
{
this->SetComponentType(UNKNOWNCOMPONENTTYPE);
this->SetComponentType(itk::IOComponentEnum::UNKNOWNCOMPONENTTYPE);
return;
}

Expand All @@ -387,36 +387,36 @@ void DCMTKImageIO::DeterminePixelType()
switch( dmp->getRepresentation() )
{
case EPR_Uint8:
this->SetComponentType ( UCHAR );
this->SetComponentType (itk::IOComponentEnum::UCHAR );
break;

case EPR_Sint8:
this->SetComponentType ( CHAR );
this->SetComponentType (itk::IOComponentEnum::CHAR );
break;

case EPR_Uint16:
this->SetComponentType ( USHORT );
this->SetComponentType (itk::IOComponentEnum::USHORT );
break;

case EPR_Sint16:
this->SetComponentType ( SHORT );
this->SetComponentType (itk::IOComponentEnum::SHORT );
break;

case EPR_Uint32:
this->SetComponentType ( UINT );
this->SetComponentType (itk::IOComponentEnum::UINT );
break;

case EPR_Sint32:
this->SetComponentType ( INT );
this->SetComponentType (itk::IOComponentEnum::INT );
break;

default:
this->SetComponentType (UNKNOWNCOMPONENTTYPE);
this->SetComponentType (itk::IOComponentEnum::UNKNOWNCOMPONENTTYPE);
}
}
else
{
this->SetComponentType (UNKNOWNCOMPONENTTYPE);
this->SetComponentType (itk::IOComponentEnum::UNKNOWNCOMPONENTTYPE);
}
}
}
Expand Down Expand Up @@ -770,31 +770,31 @@ void DCMTKImageIO::InternalRead (void* buffer, int slice, unsigned long pixelCou
size_t length = pixelCount * GetNumberOfComponents();
switch( this->GetComponentType() )
{
case CHAR:
case itk::IOComponentEnum::CHAR:
length *= sizeof(char);
break;

case UCHAR:
case itk::IOComponentEnum::UCHAR:
length *= sizeof(Uint8);
break;

case SHORT:
case itk::IOComponentEnum::SHORT:
length *= sizeof(Sint16);
break;

case USHORT:
case itk::IOComponentEnum::USHORT:
length *= sizeof(Uint16);
break;

case INT:
case itk::IOComponentEnum::INT:
length *= sizeof(Sint32);
break;

case UINT:
case itk::IOComponentEnum::UINT:
length *= sizeof(Uint32);
break;

case DOUBLE:
case itk::IOComponentEnum::DOUBLE:
length *= sizeof(Float64);
break;

Expand Down
Loading