Skip to content

Commit

Permalink
Improved documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
clementpoiret committed Jul 27, 2021
1 parent 8041a12 commit 69b8be6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ arguments::
-m MARGIN [MARGIN ...], --margin MARGIN [MARGIN ...]
Margin to add around the bounding box in voxels. It
has to be a list of 3 integers, to control the margin
in the three axis. Default: [8,8,2]
in the three axis (0: left/right margin, 1: post/ant
margin, 2: inf/sup margin). Default: [8,8,8]
--mask MASK Pattern for brain tissue mask to improve registration
(e.g.: `sub_*bet_mask.nii.gz`). If providing a BET
mask, please also pass `-b` to use a BET MNI template.
Expand Down Expand Up @@ -111,7 +112,7 @@ Let's say I have a main database folder, containing one subfolder for each subje

Therefore, to extract both left and right hippocampi (``Hippocampus``), I can run:

``roiloc -p "~/Datasets/MemoDev/ManualSegmentation/" -i "**/tse.nii.gz" -r "hippocampus" -c "t2" -b True -t "AffineFast" -m 8 8 2 --mask "*brain_mask.nii``
``roiloc -p "~/Datasets/MemoDev/ManualSegmentation/" -i "**/tse.nii.gz" -r "hippocampus" -c "t2" -b -t "AffineFast" -m 16 2 16 --mask "*brain_mask.nii``


Supported Registrations
Expand Down
4 changes: 2 additions & 2 deletions roiloc/location.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
from rich import print


def get_coords(x: np.ndarray, margin: list = [4, 4, 2]) -> list:
def get_coords(x: np.ndarray, margin: list = [8, 8, 8]) -> list:
"""Get coordinates of a given ROI, and apply a margin.
Args:
x (np.ndarray): ROI in binary format
margin (list, optional): margin for xyz axes. Defaults to [4, 4, 2]
margin (list, optional): margin for xyz axes. Defaults to [8, 8, 8]
Returns:
list: Coordinates in xyzxyz format
Expand Down
4 changes: 2 additions & 2 deletions roiloc/roiloc.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,9 @@ def start():
nargs='+',
type=int,
help=
"Margin to add around the bounding box in voxels. It has to be a list of 3 integers, to control the margin in the three axis. Default: [8,8,2]",
"Margin to add around the bounding box in voxels. It has to be a list of 3 integers, to control the margin in the three axis (0: left/right margin, 1: post/ant margin, 2: inf/sup margin). Default: [8,8,8]",
required=False,
default=[8, 8, 2])
default=[8, 8, 8])

parser.add_argument(
"--mask",
Expand Down

0 comments on commit 69b8be6

Please sign in to comment.