diff --git a/HypVINN/config/checkpoint_paths.yaml b/HypVINN/config/checkpoint_paths.yaml new file mode 100644 index 000000000..1d0c380ab --- /dev/null +++ b/HypVINN/config/checkpoint_paths.yaml @@ -0,0 +1,7 @@ +url: +- "https://b2share.fz-juelich.de/api/files/7133b542-733b-4cc6-a284-5c333ff25f78" + +checkpoint: + axial: "checkpoints/HypVINN_axial_v1.0.0.pkl" + coronal: "checkpoints/HypVINN_coronal_v1.0.0.pkl" + sagittal: "checkpoints/HypVINN_sagittal_v1.0.0.pkl" diff --git a/HypVINN/utils/checkpoint.py b/HypVINN/utils/checkpoint.py index fa8333cd0..cd7f7f9df 100644 --- a/HypVINN/utils/checkpoint.py +++ b/HypVINN/utils/checkpoint.py @@ -12,24 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -# IMPORTS -import os - -from FastSurferCNN.utils import logging -from FastSurferCNN.utils.checkpoint import ( - FASTSURFER_ROOT, - load_from_checkpoint, - create_checkpoint_dir, - get_checkpoint, - get_checkpoint_path, - save_checkpoint, -) - -logger = logging.get_logger(__name__) - -# Defaults -URL = "https://b2share.fz-juelich.de/api/files/7133b542-733b-4cc6-a284-5c333ff25f78" -HYPVINN_AXI = os.path.join(FASTSURFER_ROOT, "checkpoints/HypVINN_axial_v1.0.0.pkl") -HYPVINN_COR = os.path.join(FASTSURFER_ROOT, "checkpoints/HypVINN_coronal_v1.0.0.pkl") -HYPVINN_SAG = os.path.join(FASTSURFER_ROOT, "checkpoints/HypVINN_sagittal_v1.0.0.pkl") +from FastSurferCNN.utils.parser_defaults import FASTSURFER_ROOT +YAML_DEFAULT = FASTSURFER_ROOT / "CerebNet/config/checkpoint_paths.yaml" diff --git a/doc/overview/OUTPUT_FILES.md b/doc/overview/OUTPUT_FILES.md index a577e589c..f27e7144f 100644 --- a/doc/overview/OUTPUT_FILES.md +++ b/doc/overview/OUTPUT_FILES.md @@ -25,6 +25,24 @@ The cerebellum module outputs the files in the table shown below. Unless switche | mri | cerebellum.CerebNet.nii.gz | cerebnet | cerebellum sub-segmentation| | stats | cerebellum.CerebNet.stats | cerebnet | table of cerebellum segmentation statistics| +## HypVINN module + +The hypothalamus module outputs the files in the table shown below. Unless switched off by the `--no_hypvinn` argument, this module is automatically run whenever the segmentation module is run. It adds three files, an image with the sub-segmentation of the hypothalamus and a text file with summary statistics. + + +| directory | filename | module | description | +|:------------|----------------------------------|---------|-----------------------------------------------| +| mri | hypothalamus.HypVINN.nii.gz | hypvinn | hypothalamus sub-segmentation | +| mri | hypothalamus_mask.HypVINN.nii.gz | hypvinn | hypothalamus sub-segmentation mask | +| stats | hypothalamus.HypVINN.stats | hypvinn | table of hypothalamus segmentation statistics | + +If a T2 image is also passed, the following images are created. + +| directory | filename | module | description | +|:----------|-----------------|---------|--------------------------------| +| mri | T2_orig.mgz | hypvinn | conformed T2 image | +| mri | T2_orig_nu.mgz | hypvinn | biasfield-corrected T2 image | +| mri | T2_nu_reg.mgz | hypvinn | co-registered T2 to orig image | ## Surface module