From 06ee1725cefa35f6dc129aa26dab8408838cc61d Mon Sep 17 00:00:00 2001 From: diersk Date: Fri, 3 Jul 2026 19:43:48 +0200 Subject: [PATCH 1/7] Adapted to changes in scipy library --- VERSION | 2 +- hipsta/computeCubeParam.py | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/VERSION b/VERSION index 2774f85..60032f2 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.10.0 \ No newline at end of file +0.10.1-dev \ No newline at end of file diff --git a/hipsta/computeCubeParam.py b/hipsta/computeCubeParam.py index 7b02992..adcf658 100755 --- a/hipsta/computeCubeParam.py +++ b/hipsta/computeCubeParam.py @@ -84,8 +84,8 @@ def getSeamCase1(v4c, t4c, i4c, k4c, vfuncXEv1, e4cBndOpen, newTetra, newVtcs, n newVtcsAdj[t4c[i, idxPos1], t4c[i, idxNeg1]] = idxPt1 newVtcsAdj[t4c[i, idxNeg1], t4c[i, idxPos1]] = idxPt1 # also append i4c and k4c - i4c = np.concatenate((i4c, st.mode(i4c[t4c[i, :]])[0])) - k4c = np.concatenate((k4c, st.mode(k4c[t4c[i, :]])[0])) + i4c = np.concatenate((i4c, np.array(st.mode(i4c[t4c[i, :]])[0], ndmin=1))) + k4c = np.concatenate((k4c, np.array(st.mode(k4c[t4c[i, :]])[0], ndmin=1))) newVtcs = np.concatenate((newVtcs, [idxPt1])) else: idxPt1 = newVtcsAdj[t4c[i, idxPos1], t4c[i, idxNeg1]] @@ -100,8 +100,8 @@ def getSeamCase1(v4c, t4c, i4c, k4c, vfuncXEv1, e4cBndOpen, newTetra, newVtcs, n newVtcsAdj[t4c[i, idxPos2], t4c[i, idxNeg1]] = idxPt2 newVtcsAdj[t4c[i, idxNeg1], t4c[i, idxPos2]] = idxPt2 # also append i4c and k4c - i4c = np.concatenate((i4c, st.mode(i4c[t4c[i, :]])[0])) - k4c = np.concatenate((k4c, st.mode(k4c[t4c[i, :]])[0])) + i4c = np.concatenate((i4c, np.array(st.mode(i4c[t4c[i, :]])[0], ndmin=1))) + k4c = np.concatenate((k4c, np.array(st.mode(k4c[t4c[i, :]])[0], ndmin=1))) newVtcs = np.concatenate((newVtcs, [idxPt2])) else: idxPt2 = newVtcsAdj[t4c[i, idxPos2], t4c[i, idxNeg1]] @@ -162,8 +162,8 @@ def getSeamCase1(v4c, t4c, i4c, k4c, vfuncXEv1, e4cBndOpen, newTetra, newVtcs, n newVtcsAdj[t4c[i, idxPos1], t4c[i, idxNeg1]] = idxPt1 newVtcsAdj[t4c[i, idxNeg1], t4c[i, idxPos1]] = idxPt1 # also append i4c and k4c - i4c = np.concatenate((i4c, st.mode(i4c[t4c[i, :]])[0])) - k4c = np.concatenate((k4c, st.mode(k4c[t4c[i, :]])[0])) + i4c = np.concatenate((i4c, np.array(st.mode(i4c[t4c[i, :]])[0], ndmin=1))) + k4c = np.concatenate((k4c, np.array(st.mode(k4c[t4c[i, :]])[0], ndmin=1))) newVtcs = np.concatenate((newVtcs, [idxPt1])) else: idxPt1 = newVtcsAdj[t4c[i, idxPos1], t4c[i, idxNeg1]] @@ -178,8 +178,8 @@ def getSeamCase1(v4c, t4c, i4c, k4c, vfuncXEv1, e4cBndOpen, newTetra, newVtcs, n newVtcsAdj[t4c[i, idxPos1], t4c[i, idxNeg2]] = idxPt2 newVtcsAdj[t4c[i, idxNeg2], t4c[i, idxPos1]] = idxPt2 # also append i4c and k4c - i4c = np.concatenate((i4c, st.mode(i4c[t4c[i, :]])[0])) - k4c = np.concatenate((k4c, st.mode(k4c[t4c[i, :]])[0])) + i4c = np.concatenate((i4c, np.array(st.mode(i4c[t4c[i, :]])[0], ndmin=1))) + k4c = np.concatenate((k4c, np.array(st.mode(k4c[t4c[i, :]])[0], ndmin=1))) newVtcs = np.concatenate((newVtcs, [idxPt2])) else: idxPt2 = newVtcsAdj[t4c[i, idxPos1], t4c[i, idxNeg2]] @@ -239,8 +239,8 @@ def getSeamCase2(v4c, t4c, i4c, k4c, vfuncXEv1, e4cBndOpen, newTetra, newVtcs, n newVtcsAdj[t4c[i, idxPos1], t4c[i, idxNeg1]] = idxPt1 newVtcsAdj[t4c[i, idxNeg1], t4c[i, idxPos1]] = idxPt1 # also append i4c and k4c - i4c = np.concatenate((i4c, st.mode(i4c[t4c[i, :]])[0])) - k4c = np.concatenate((k4c, st.mode(k4c[t4c[i, :]])[0])) + i4c = np.concatenate((i4c, np.array(st.mode(i4c[t4c[i, :]])[0], ndmin=1))) + k4c = np.concatenate((k4c, np.array(st.mode(k4c[t4c[i, :]])[0], ndmin=1))) newVtcs = np.concatenate((newVtcs, [idxPt1])) else: idxPt1 = newVtcsAdj[t4c[i, idxPos1], t4c[i, idxNeg1]] From 025559d24251b92d40d1701f09d520bf32eff466 Mon Sep 17 00:00:00 2001 From: diersk Date: Fri, 3 Jul 2026 19:54:45 +0200 Subject: [PATCH 2/7] Updated documentation --- docker/Docker.md | 4 +++- singularity/Singularity.md | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/docker/Docker.md b/docker/Docker.md index 349ef68..37e5edd 100644 --- a/docker/Docker.md +++ b/docker/Docker.md @@ -51,7 +51,8 @@ docker run \ --filename /path_to_input_directory_inside_docker/my_filename.mgz \ --outputdir /path_to_output_directory_inside_docker \ --hemi HEMISPHERE \ - --lut LOOKUP-TABLE + --lut LOOKUP-TABLE \ + --no-qc ``` * The first two `-v` arguments mount your data directory and output directories into the Docker image (note that full, not relative, pathnames should be given). Inside the image, they are visible under the name following the colon (in this case `/path_to_input_directory_inside_docker` and `/path_to_output_directory_inside_docker`, but these can be different). From within the docker image / container, there will be read and write access to the directories that are mounted into the image (unless specified otherwise; for example, use `-v /path/to/my/input/directory:/path_to_input_directory_inside_docker:ro` for read-only access to your input directory). Note that the `/path/to/my/input/directory` directory should exist already, otherwise it might be created by the docker image (and have root permissions, which is not desirable). @@ -59,3 +60,4 @@ docker run \ * The next part of the Docker command is the name of the Docker image, which is `hipstafreesurfer * After that, all other flags are identical to the ones that are used for the `run_hipsta` program (which are explained on the main page and the help message of the program). Note that, in addition to the `--filename`, `--hemi`, `--lut` arguments, which are mandatory, additional arguments such as `--outputdir` can be specified - in the same way as for non-dockerized version of the program. Also note that file- and pathnames need to correspond to the targets of the file / directory mappings within the Docker image, not to the local system. It is possible to add subdirectories after `--outputdir /path_to_output_directory_inside_docker`, e.g. for adding case IDs: `--outputdir /path_to_output_directory_inside_docker/case_0000`. * Finally, `HEMISPHERE` should either be `lh` or `rh`, and `LOOKUP-TABLE` should be `freesurfer`, `ashs-penn_abc_3t_t2`, `ashs-umcutrecht_7t` or a custom segmentation. +* The creation of QC images is currently not supported when using Docker or Singularity due to rendering issues when a display is not (necessarily) present, hence the `--no-qc` argument. diff --git a/singularity/Singularity.md b/singularity/Singularity.md index f757463..70e6788 100644 --- a/singularity/Singularity.md +++ b/singularity/Singularity.md @@ -38,11 +38,13 @@ singularity exec \ --filename /path_to_input_directory_inside_container/my_filename.mgz \ --outputdir /path_to_output_directory_inside_container \ --hemi HEMISPHERE \ - --lut LOOKUP-TABLE + --lut LOOKUP-TABLE \ + --no-qc ``` * The first two `-B` arguments mount your data directory and output directories into the singularity image (note that full, not relative, pathnames should be given). Inside the image, they are visible under the name following the colon (in this case `/path_to_input_directory_inside_container` and `/path_to_output_directory_inside_container`, but these can be different). From within the singularity image / container, there will be read and write access to the directories that are mounted into the image (unless specified otherwise). * The third `-B` argument mounts your freesurfer license to the FreeSurfer directory within the singularity image (`/opt/freesurfer`). You can use a `.license` or a `license.txt` file, which can, but does not need to, be present in your local FreeSurfer directory on your system. The version of the license should correspond to the version inside the [`Dockerfile`](../docker/Dockerfile) that was used to create the original Docker image. * The next part of the command is the name of the Singularity image, which is `hipsta.sif`. In this example it is located in `/home/user/my_singularity_images`, but the specific path will likely be different on your local system. * For the Singularity image, we also have to explicitly specify the command that we want run, i.e. `run_hipsta`. -* After that, all other flags are identical to the ones that are used for the `run_hipsta` program (which are explained on the main page and the help message of the program). Note that, in addition to the `--filename`, `--hemi`, `--lut` arguments, which are mandatory, additional arguments such as `--outputdir` can be specified. Also note that file- and pathnames need to correspond to the targets of the file / directory mappings within the singularity image, not to the local system. Finally, `HEMISPHERE` should either be `lh` or `rh`, and `LOOKUP-TABLE` should be `freesurfer`, `ashs-penn_abc_3t_t2`, `ashs-umcutrecht_7t` or a custom segmentation. +* After that, all other flags are identical to the ones that are used for the `run_hipsta` program (which are explained on the main page and the help message of the program). Note that, in addition to the `--filename`, `--hemi`, `--lut` arguments, which are mandatory, additional arguments such as `--outputdir` can be specified. Also note that file- and pathnames need to correspond to the targets of the file / directory mappings within the singularity image, not to the local system. Finally, `HEMISPHERE` should either be `lh` or `rh`, and `LOOKUP-TABLE` should be `freesurfer`, `ashs-penn_abc_3t_t2`, `ashs-umcutrecht_7t` or a custom segmentation. +* The creation of QC images is currently not supported when using Docker or Singularity due to rendering issues when a display is not (necessarily) present, hence the `--no-qc` argument. From 16db5f9071877f59aa2cd5ee4a103dd2f08cb218 Mon Sep 17 00:00:00 2001 From: diersk Date: Fri, 3 Jul 2026 19:55:13 +0200 Subject: [PATCH 3/7] Added missing check for no-qc flag --- hipsta/utils/qc_plots.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hipsta/utils/qc_plots.py b/hipsta/utils/qc_plots.py index 2f8fc70..3966010 100644 --- a/hipsta/utils/qc_plots.py +++ b/hipsta/utils/qc_plots.py @@ -297,7 +297,7 @@ def qcPlots(params, stage=None): fig.write_image(os.path.join(params.OUTDIR, "qc", params.HEMI + ".profile.png")) # hull - if stage == "hull": + if params.internal.no_qc is False and stage == "hull": triaMesh = TriaMesh.read_vtk(os.path.join(params.OUTDIR, "thickness", params.HEMI + ".hull.vtk")) camera = dict( From 1784222b37735485abe8c9787d1ff360150c361d Mon Sep 17 00:00:00 2001 From: diersk Date: Fri, 3 Jul 2026 20:03:41 +0200 Subject: [PATCH 4/7] Updated requirements --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 03a6cb1..98d2d86 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,7 @@ pandas>=1.3.0 plotly>=5.6.0 pyacvd>=0.2.9 pyvista>=0.37.0 -scipy!=1.13.0 +scipy>=1.15.0 nilearn>=0.8.1 lapy>=1.0.0 kaleido>=0.2.1 From 1525d4b9b29338dc9c5fe2735d6f2bbbad68c4a2 Mon Sep 17 00:00:00 2001 From: diersk Date: Fri, 3 Jul 2026 20:14:30 +0200 Subject: [PATCH 5/7] Updated version --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 60032f2..71172b4 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.10.1-dev \ No newline at end of file +0.10.1 \ No newline at end of file From 9bb3c07f00af76d8e5195c2d1002022518ac70ee Mon Sep 17 00:00:00 2001 From: diersk Date: Fri, 3 Jul 2026 20:18:07 +0200 Subject: [PATCH 6/7] Fixed typos --- TUTORIAL.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/TUTORIAL.md b/TUTORIAL.md index 18d135e..86e9ebd 100644 --- a/TUTORIAL.md +++ b/TUTORIAL.md @@ -307,7 +307,7 @@ provided for interior, mid, and exterior surfaces: The Penn ABC-3T ASHS atlas includes several labels beyond the hippocampus, including parahippocampal, entorhinal, BA35, and BA36 regions. The analysis can -extended to parts of these regions as well. The corresponding processing +be extended to parts of these regions as well. The corresponding processing variants can be called with the `--lut ashs-penn_abc_3t_t2_ext` and `--lut ashs-penn_abc_3t_t2_ent` arguments. The former will add (parts of) parahippocampal and entorhinal cortex as well as BA35 to the analysis, but still restrict the analysis to the @@ -336,7 +336,7 @@ section on Troubleshooting for details). ![](images/scaled/ctx-02.png) The expected output when using `--lut ashs-penn_abc_3t_t2_ent` is shown below. -Here, we leave out the hippocampal labels and restrict the analysis the +Here, we leave out the hippocampal labels and restrict the analysis to the complete entorhinal cortex segmentation. ![](images/scaled/erc-01a.png) @@ -344,7 +344,7 @@ complete entorhinal cortex segmentation. ![](images/scaled/erc-01c.png) Care should be taken that the entorhinal cortex is cut across its full extent -at its anterior and posterior ends. The left figure shows to conservative +at its anterior and posterior ends. The left figure shows too conservative cutting, the middle and right figure more appropriate cuts. Cutting can be adjusted using the `--cut-range` and `--automask-head-margin` / `--automask-tail-margin` arguments (see the following section on Troubleshooting for details). From 5362c7ec2e9ded822b170d41b93bee4636d6fc1f Mon Sep 17 00:00:00 2001 From: Kersten Diers Date: Fri, 3 Jul 2026 20:27:42 +0200 Subject: [PATCH 7/7] Fix typo Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- docker/Docker.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/Docker.md b/docker/Docker.md index 37e5edd..06e274e 100644 --- a/docker/Docker.md +++ b/docker/Docker.md @@ -57,7 +57,7 @@ docker run \ * The first two `-v` arguments mount your data directory and output directories into the Docker image (note that full, not relative, pathnames should be given). Inside the image, they are visible under the name following the colon (in this case `/path_to_input_directory_inside_docker` and `/path_to_output_directory_inside_docker`, but these can be different). From within the docker image / container, there will be read and write access to the directories that are mounted into the image (unless specified otherwise; for example, use `-v /path/to/my/input/directory:/path_to_input_directory_inside_docker:ro` for read-only access to your input directory). Note that the `/path/to/my/input/directory` directory should exist already, otherwise it might be created by the docker image (and have root permissions, which is not desirable). * The third `-v` argument mounts your freesurfer license to the FreeSurfer directory within the Docker image (`/opt/freesurfer`). You can use a `.license` or a `license.txt` file, which can, but does not need to, be present in your local FreeSurfer directory on your system. The version of the license should correspond to the version inside the [`Dockerfile`](Dockerfile) that was used to create the Docker image. -* The next part of the Docker command is the name of the Docker image, which is `hipstafreesurfer +* The next part of the Docker command is the name of the Docker image, which is `hipsta`. * After that, all other flags are identical to the ones that are used for the `run_hipsta` program (which are explained on the main page and the help message of the program). Note that, in addition to the `--filename`, `--hemi`, `--lut` arguments, which are mandatory, additional arguments such as `--outputdir` can be specified - in the same way as for non-dockerized version of the program. Also note that file- and pathnames need to correspond to the targets of the file / directory mappings within the Docker image, not to the local system. It is possible to add subdirectories after `--outputdir /path_to_output_directory_inside_docker`, e.g. for adding case IDs: `--outputdir /path_to_output_directory_inside_docker/case_0000`. * Finally, `HEMISPHERE` should either be `lh` or `rh`, and `LOOKUP-TABLE` should be `freesurfer`, `ashs-penn_abc_3t_t2`, `ashs-umcutrecht_7t` or a custom segmentation. * The creation of QC images is currently not supported when using Docker or Singularity due to rendering issues when a display is not (necessarily) present, hence the `--no-qc` argument.