diff --git a/.github/workflows/build_on_prerelease.yml b/.github/workflows/build_on_prerelease.yml index d848349..75c0867 100644 --- a/.github/workflows/build_on_prerelease.yml +++ b/.github/workflows/build_on_prerelease.yml @@ -94,7 +94,7 @@ jobs: - name: Running all test pipelines (ANTS cenir macaque petra) run: | - docker run -i -v /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI:/data macatools/skullto3d:latest segment_petra -data /data/cenir-macaque-petra -out /data/cenir-macaque-petra/results -soft ANTS_prep_skull -species macaque -sub Magneto -brain_dt T1 T2 -skull_dt petra -deriv -pad -nprocs 1 + docker run -i -v /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI:/data macatools/skullto3d:latest segment_skull -data /data/cenir-macaque-petra -out /data/cenir-macaque-petra/results -soft ANTS_prep_skull -species macaque -sub Magneto -brain_dt T1 T2 -skull_dt petra -deriv -pad -nprocs 1 ls /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cenir-macaque-petra/results @@ -140,7 +140,7 @@ jobs: - name: Running all test pipelines (ANTS cerimed macaque CT) run: | - docker run -i -v /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI:/data macatools/skullto3d:latest segment_petra -data /data/cerimed-macaque-ct -out /data/cerimed-macaque-ct/results -soft ANTS_prep_skull -species macaque -sub Marvin -ses 01 -brain_dt T1 T2 -skull_dt CT -deriv -pad -nprocs 1 + docker run -i -v /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI:/data macatools/skullto3d:latest segment_skull -data /data/cerimed-macaque-ct -out /data/cerimed-macaque-ct/results -soft ANTS_prep_skull -species macaque -sub Marvin -ses 01 -brain_dt T1 T2 -skull_dt CT -deriv -pad -nprocs 1 ls /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cerimed-macaque-ct/results @@ -186,7 +186,7 @@ jobs: - name: Running all test pipelines (ANTS cerimed marmo petra) run: | - docker run -i -v /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI:/data macatools/skullto3d:latest segment_petra -data /data/cerimed-marmo-petra -out /data/cerimed-marmo-petra/results -soft ANTS_noseg_skull -species marmo -sub Paolina -ses 01 -brain_dt T1 T2 -skull_dt T1 petra -deriv -pad -nprocs 1 + docker run -i -v /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI:/data macatools/skullto3d:latest segment_skull -data /data/cerimed-marmo-petra -out /data/cerimed-marmo-petra/results -soft ANTS_noseg_skull -species marmo -sub Paolina -ses 01 -brain_dt T1 T2 -skull_dt T1 petra -deriv -pad -nprocs 1 ls /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cerimed-marmo-petra/results diff --git a/.github/workflows/build_on_release.yml b/.github/workflows/build_on_release.yml index 87614a9..0830bce 100644 --- a/.github/workflows/build_on_release.yml +++ b/.github/workflows/build_on_release.yml @@ -95,7 +95,7 @@ jobs: - name: Running all test pipelines (ANTS cenir macaque petra) run: | - docker run -i -v /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI:/data macatools/skullto3d:latest segment_petra -data /data/cenir-macaque-petra -out /data/cenir-macaque-petra/results -soft ANTS_prep_skull -species macaque -sub Magneto -brain_dt T1 T2 -skull_dt petra -deriv -pad -nprocs 1 + docker run -i -v /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI:/data macatools/skullto3d:latest segment_skull -data /data/cenir-macaque-petra -out /data/cenir-macaque-petra/results -soft ANTS_prep_skull -species macaque -sub Magneto -brain_dt T1 T2 -skull_dt petra -deriv -pad -nprocs 1 ls /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cenir-macaque-petra/results @@ -141,7 +141,7 @@ jobs: - name: Running all test pipelines (ANTS cerimed macaque CT) run: | - docker run -i -v /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI:/data macatools/skullto3d:latest segment_petra -data /data/cerimed-macaque-ct -out /data/cerimed-macaque-ct/results -soft ANTS_prep_skull -species macaque -sub Marvin -ses 01 -brain_dt T1 T2 -skull_dt CT -deriv -pad -nprocs 1 + docker run -i -v /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI:/data macatools/skullto3d:latest segment_skull -data /data/cerimed-macaque-ct -out /data/cerimed-macaque-ct/results -soft ANTS_prep_skull -species macaque -sub Marvin -ses 01 -brain_dt T1 T2 -skull_dt CT -deriv -pad -nprocs 1 ls /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cerimed-macaque-ct/results @@ -186,7 +186,7 @@ jobs: - name: Running all test pipelines (ANTS cerimed marmo petra) run: | - docker run -i -v /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI:/data macatools/skullto3d:latest segment_petra -data /data/cerimed-marmo-petra -out /data/cerimed-marmo-petra/results -soft ANTS_noseg_skull -species marmo -sub Paolina -ses 01 -brain_dt T1 T2 -skull_dt T1 petra -deriv -pad -nprocs 1 + docker run -i -v /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI:/data macatools/skullto3d:latest segment_skull -data /data/cerimed-marmo-petra -out /data/cerimed-marmo-petra/results -soft ANTS_noseg_skull -species marmo -sub Paolina -ses 01 -brain_dt T1 T2 -skull_dt T1 petra -deriv -pad -nprocs 1 ls /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cerimed-marmo-petra/results diff --git a/.github/workflows/check_on_PR.yml b/.github/workflows/check_on_PR.yml index ddbf6bf..c082fb1 100644 --- a/.github/workflows/check_on_PR.yml +++ b/.github/workflows/check_on_PR.yml @@ -58,31 +58,31 @@ jobs: - name: Running all test pipelines (ANTS SPM) run: | - python workflows/segment_petra.py -data /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cenir-macaque-petra -out /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cenir-macaque-petra/results -soft ANTS_test_skull -species macaque -sub Magneto -brain_dt T1 T2 -skull_dt T1 petra + python workflows/segment_skull.py -data /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cenir-macaque-petra -out /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cenir-macaque-petra/results -soft ANTS_test_skull -species macaque -sub Magneto -brain_dt T1 T2 -skull_dt T1 petra - python workflows/segment_petra.py -data /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cerimed-macaque-ct -out /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cerimed-macaque-ct/results -soft ANTS_test_skull -species macaque -sub Marvin -ses 01 -brain_dt T1 T2 -skull_dt T1 CT + python workflows/segment_skull.py -data /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cerimed-macaque-ct -out /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cerimed-macaque-ct/results -soft ANTS_test_skull -species macaque -sub Marvin -ses 01 -brain_dt T1 T2 -skull_dt T1 CT - python workflows/segment_petra.py -data /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cerimed-marmo-petra -out /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cerimed-marmo-petra/results -soft ANTS_test_skull -species marmo -sub Paolina -ses 01 -brain_dt T1 T2 -skull_dt T1 petra + python workflows/segment_skull.py -data /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cerimed-marmo-petra -out /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cerimed-marmo-petra/results -soft ANTS_test_skull -species marmo -sub Paolina -ses 01 -brain_dt T1 T2 -skull_dt T1 petra - python workflows/segment_petra.py -data /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cenir-macaque-petra -out /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cenir-macaque-petra/results -soft SPM_native_test_skull -species macaque -sub Magneto -brain_dt T1 T2 -skull_dt T1 petra + python workflows/segment_skull.py -data /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cenir-macaque-petra -out /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cenir-macaque-petra/results -soft SPM_native_test_skull -species macaque -sub Magneto -brain_dt T1 T2 -skull_dt T1 petra - python workflows/segment_petra.py -data /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cerimed-macaque-ct -out /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cerimed-macaque-ct/results -soft SPM_native_test_skull -species macaque -sub Marvin -ses 01 -brain_dt T1 T2 -skull_dt T1 CT + python workflows/segment_skull.py -data /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cerimed-macaque-ct -out /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cerimed-macaque-ct/results -soft SPM_native_test_skull -species macaque -sub Marvin -ses 01 -brain_dt T1 T2 -skull_dt T1 CT - python workflows/segment_petra.py -data /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cerimed-marmo-petra -out /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cerimed-marmo-petra/results -soft SPM_native_test_skull -species marmo -sub Paolina -ses 01 -brain_dt T1 T2 -skull_dt T1 petra + python workflows/segment_skull.py -data /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cerimed-marmo-petra -out /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cerimed-marmo-petra/results -soft SPM_native_test_skull -species marmo -sub Paolina -ses 01 -brain_dt T1 T2 -skull_dt T1 petra - name: Running all test pipelines (ANTS SPM deriv pad) run: | - python workflows/segment_petra.py -data /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cenir-macaque-petra -out /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cenir-macaque-petra/results -soft ANTS_test_skull -species macaque -sub Magneto -brain_dt T1 T2 -skull_dt T1 petra -deriv -pad + python workflows/segment_skull.py -data /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cenir-macaque-petra -out /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cenir-macaque-petra/results -soft ANTS_test_skull -species macaque -sub Magneto -brain_dt T1 T2 -skull_dt T1 petra -deriv -pad - python workflows/segment_petra.py -data /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cerimed-macaque-ct -out /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cerimed-macaque-ct/results -soft ANTS_test_skull -species macaque -sub Marvin -ses 01 -brain_dt T1 T2 -skull_dt T1 CT -deriv -pad + python workflows/segment_skull.py -data /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cerimed-macaque-ct -out /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cerimed-macaque-ct/results -soft ANTS_test_skull -species macaque -sub Marvin -ses 01 -brain_dt T1 T2 -skull_dt T1 CT -deriv -pad - python workflows/segment_petra.py -data /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cerimed-marmo-petra -out /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cerimed-marmo-petra/results -soft ANTS_test_skull -species marmo -sub Paolina -ses 01 -brain_dt T1 T2 -skull_dt T1 petra -deriv -pad + python workflows/segment_skull.py -data /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cerimed-marmo-petra -out /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cerimed-marmo-petra/results -soft ANTS_test_skull -species marmo -sub Paolina -ses 01 -brain_dt T1 T2 -skull_dt T1 petra -deriv -pad - python workflows/segment_petra.py -data /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cenir-macaque-petra -out /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cenir-macaque-petra/results -soft SPM_native_test_skull -species macaque -sub Magneto -brain_dt T1 T2 -skull_dt T1 petra -deriv -pad + python workflows/segment_skull.py -data /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cenir-macaque-petra -out /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cenir-macaque-petra/results -soft SPM_native_test_skull -species macaque -sub Magneto -brain_dt T1 T2 -skull_dt T1 petra -deriv -pad - python workflows/segment_petra.py -data /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cerimed-macaque-ct -out /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cerimed-macaque-ct/results -soft SPM_native_test_skull -species macaque -sub Marvin -ses 01 -brain_dt T1 T2 -skull_dt T1 CT -deriv -pad + python workflows/segment_skull.py -data /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cerimed-macaque-ct -out /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cerimed-macaque-ct/results -soft SPM_native_test_skull -species macaque -sub Marvin -ses 01 -brain_dt T1 T2 -skull_dt T1 CT -deriv -pad - python workflows/segment_petra.py -data /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cerimed-marmo-petra -out /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cerimed-marmo-petra/results -soft SPM_native_test_skull -species marmo -sub Paolina -ses 01 -brain_dt T1 T2 -skull_dt T1 petra -deriv -pad + python workflows/segment_skull.py -data /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cerimed-marmo-petra -out /home/runner/work/skullTo3d/skullTo3d/skullTo3d_CI/cerimed-marmo-petra/results -soft SPM_native_test_skull -species marmo -sub Paolina -ses 01 -brain_dt T1 T2 -skull_dt T1 petra -deriv -pad diff --git a/MANIFEST.in b/MANIFEST.in index 51b4cc3..b804cf3 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,2 +1,4 @@ include workflows/params*.json + +include skullTo3d/_version.py diff --git a/docs/command.rst b/docs/command.rst index 7651b30..e144972 100644 --- a/docs/command.rst +++ b/docs/command.rst @@ -9,17 +9,17 @@ Launching a processing Commands ******** -The main file is located in workflows and is called segment_petra.py and should be called like a python script: +The main file is located in workflows and is called segment_skull.py and should be called like a python script: .. code:: bash - $ python workflows/segment_petra.py + $ python workflows/segment_skull.py **N.B. if you have installed the pypi version (e.g. using pip install macapype) or a docker/singularity version, you can replace the previous command by the following command:** .. code:: bash - $ segment_petra + $ segment_skull @@ -27,11 +27,11 @@ For container (docker and singularity), here are some examples - add your proper .. code:: bash - $ docker run -B binding_to_host:binding_guest macatools/skullto3d:latest segment_petra + $ docker run -B binding_to_host:binding_guest macatools/skullto3d:latest segment_skull .. code:: bash - $ singularity run -v binding_to_host:binding_guest /path/to/containers/skullto3d_v0.0.4.1.sif segment_petra + $ singularity run -v binding_to_host:binding_guest /path/to/containers/skullto3d_v0.0.4.1.sif segment_skull Expected input data ******************* @@ -131,13 +131,13 @@ Command line examples .. code:: bash - $ python workflows/segment_petra.py -data ~/Data_maca -out ./local_test -soft ANTS_skull -params params.json + $ python workflows/segment_skull.py -data ~/Data_maca -out ./local_test -soft ANTS_skull -params params.json .. code:: bash - $ python workflows/segment_petra.py -data ~/Data_maca -out ./local_test -soft ANTS_skull_robustreg -species macaque + $ python workflows/segment_skull.py -data ~/Data_maca -out ./local_test -soft ANTS_skull_robustreg -species macaque .. code:: bash - $ python workflows/segment_petra.py -data ~/Data_maca -out ./local_test -soft ANTS_skull -params params.json -sub Apache Baron -ses 01 -rec mean -deriv -pad + $ python workflows/segment_skull.py -data ~/Data_maca -out ./local_test -soft ANTS_skull -params params.json -sub Apache Baron -ses 01 -rec mean -deriv -pad diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..b5b4871 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,50 @@ +[build-system] +requires = [ + "setuptools", "wheel" +] +build-backend = "setuptools.build_meta" + +[project] +dynamic = ['version'] +name = "skullTo3d" +maintainers = [{name = "SkullTo3d developers" }] +authors= [{name = "Macatools team"}] +description= "Pipeline for skull extraction for macaque/marmoset " +readme = {content-type = "text/markdown", file = "README.md"} +requires-python = ">= 3.10" +license = {text = "BSD-3-Clause"} + +dependencies = [ + "macapype", + "matplotlib" +] + +[project.optional-dependencies] +# Dependencies for building the documentation +doc_deps = [ + "sphinx", + "sphinx-gallery", + "sphinx_bootstrap_theme", + "numpydoc", + "sphinxcontrib-fulltoc" +] + +# Dependencies for test +test_deps = [ + "pytest", + "pytest-cov", + "codecov", + ] +flake_deps = [ + "flake8" + ] + +# real calls +test=["skullTo3d[test_deps, flake_deps]"] +doc=["skullTo3d[flake_deps, test_deps, doc_deps]"] + +[project.scripts] +segment_skull = "workflows.segment_skull:main" + +[tool.setuptools.packages] +find = {} # Scanning implicit namespaces is active by default diff --git a/setup.py b/setup.py index 78b56bd..d6cc34c 100644 --- a/setup.py +++ b/setup.py @@ -1,59 +1,28 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- - +from setuptools import setup import re -from setuptools import find_packages, setup - -test_deps = ['codecov', 'pytest', 'pytest-cov'] - -flake_deps = ['flake8'] - -doc_deps = ['sphinx', - 'sphinx-gallery', - 'sphinx_bootstrap_theme', - 'numpydoc', - 'sphinxcontrib-fulltoc', - 'matplotlib'] -# requirements -with open('requirements.txt') as f: - requirements = f.read().splitlines() -# version -verstr = "unknown" -try: - verstrline = open('skullTo3d/_version.py', "rt").read() -except EnvironmentError: - pass # Okay, there is no version file. +def _get_version(): -else: - VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]" - mo = re.search(VSRE, verstrline, re.M) - if mo: - verstr = mo.group(1) + verstr = "unknown" + try: + verstrline = open('skullTo3d/_version.py', "rt").read() + except EnvironmentError: + pass # Okay, there is no version file. else: - raise RuntimeError("unable to find version in yourpackage/_version.py") - -print("Will not build conda module") - -print("*******************************************************") -print(find_packages()) -print("*******************************************************") - -setup( - name="skullTo3d", - version=verstr, - packages=find_packages(), - author="macatools team", - description="Pipeline for skull extraction for macaque/marmoset", - long_description=open('README.md').read(), - long_description_content_type='text/markdown', - license='BSD 3', - entry_points={ - 'console_scripts': ['segment_petra = workflows.segment_petra:main']}, - extras_require={ - 'test': test_deps + flake_deps, - 'doc': flake_deps + test_deps + doc_deps - }, - install_requires=requirements, - include_package_data=True) + VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]" + mo = re.search(VSRE, verstrline, re.M) + if mo: + verstr = mo.group(1) + else: + raise RuntimeError( + "unable to find version in yourpackage/_version.py") + return verstr + + +if __name__ == "__main__": + setup( + version=_get_version() + ) diff --git a/skullTo3d/pipelines/skull_pipe.py b/skullTo3d/pipelines/skull_pipe.py index 4cbcc90..cd38a46 100644 --- a/skullTo3d/pipelines/skull_pipe.py +++ b/skullTo3d/pipelines/skull_pipe.py @@ -409,13 +409,32 @@ def create_skull_ct_pipe(name="skull_ct_pipe", params={}): skull_ct_pipe.connect(inputnode, "native_T1", align_ct_on_T1, "ref_file") + if "align_ct_on_T1_2" in params: + + # align_ct_on_T1 + align_ct_on_T1_2 = pe.Node(interface=RegAladin(), + name="align_ct_on_T1_2") + + align_ct_on_T1_2.inputs.rig_only_flag = True + + skull_ct_pipe.connect(align_ct_on_T1, 'res_file', + align_ct_on_T1_2, "flo_file") + + skull_ct_pipe.connect(inputnode, "native_T1", + align_ct_on_T1_2, "ref_file") + # align_ct_on_stereo_T1 align_ct_on_stereo_T1 = pe.Node( interface=RegResample(pad_val=0.0), name="align_ct_on_stereo_T1") - skull_ct_pipe.connect(align_ct_on_T1, 'res_file', - align_ct_on_stereo_T1, "flo_file") + if "align_ct_on_T1_2" in params: + skull_ct_pipe.connect(align_ct_on_T1_2, 'res_file', + align_ct_on_stereo_T1, "flo_file") + + else: + skull_ct_pipe.connect(align_ct_on_T1, 'res_file', + align_ct_on_stereo_T1, "flo_file") skull_ct_pipe.connect(inputnode, 'native_to_stereo_trans', align_ct_on_stereo_T1, "trans_file") diff --git a/workflows/params_segment_macaque_ants_skull.json b/workflows/params_segment_macaque_ants_skull.json index 450e421..990b786 100755 --- a/workflows/params_segment_macaque_ants_skull.json +++ b/workflows/params_segment_macaque_ants_skull.json @@ -177,6 +177,9 @@ }, "skull_ct_pipe": { + "align_ct_on_T1_2": + { + }, "ct_skull_auto_mask": { "kmeans": true, diff --git a/workflows/params_segment_marmo_ants_skull.json b/workflows/params_segment_marmo_ants_skull.json index aa448ca..86f9e3e 100755 --- a/workflows/params_segment_marmo_ants_skull.json +++ b/workflows/params_segment_marmo_ants_skull.json @@ -11,6 +11,8 @@ "use_T2":{}, "crop_aladin_pipe": { + "remove_capsule_pipe":{}, + "reg_T1_on_template": { "nac_flag": true, diff --git a/workflows/segment_petra.py b/workflows/segment_skull.py similarity index 100% rename from workflows/segment_petra.py rename to workflows/segment_skull.py