Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions TUTORIAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -336,15 +336,15 @@ 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)
![](images/scaled/erc-01b.png)
![](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).
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.10.0
0.10.1
6 changes: 4 additions & 2 deletions docker/Docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,13 @@ 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).
* 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.
20 changes: 10 additions & 10 deletions hipsta/computeCubeParam.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]]
Expand All @@ -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]]
Expand Down Expand Up @@ -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]]
Expand All @@ -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]]
Expand Down Expand Up @@ -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]]
Expand Down
2 changes: 1 addition & 1 deletion hipsta/utils/qc_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions singularity/Singularity.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Loading