├── .gitattributes ├── .github └── workflows │ ├── DeepSliceTests.yml │ ├── ebrains.yml │ └── python-publish.yml ├── .gitignore ├── DeepSlice ├── __init__.py ├── coord_post_processing │ ├── __init__.py │ ├── angle_methods.py │ ├── depth_estimation.py │ ├── plane_alignment_functions │ │ ├── __init__.py │ │ └── plane_alignment.py │ └── spacing_and_indexing.py ├── main.py ├── metadata │ ├── __init__.py │ ├── config.json │ ├── metadata_loader.py │ ├── volumes │ │ └── placeholder.txt │ └── weights │ │ └── placeholder.txt ├── neural_network │ ├── __init__.py │ ├── network_architecture.py │ └── neural_network.py └── read_and_write │ ├── QuickNII_functions.py │ └── __init__.py ├── LICENSE ├── README.md ├── docs ├── DeepSlice.rst ├── Makefile ├── _build │ ├── doctrees │ │ ├── DeepSlice.coord_post_processing.doctree │ │ ├── DeepSlice.coord_post_processing.plane_alignment_functions.doctree │ │ ├── DeepSlice.doctree │ │ ├── DeepSlice.metadata.doctree │ │ ├── DeepSlice.neural_network.doctree │ │ ├── DeepSlice.read_and_write.doctree │ │ ├── environment.pickle │ │ ├── index.doctree │ │ └── modules.doctree │ └── html │ │ ├── .buildinfo │ │ ├── DeepSlice.html │ │ ├── _sources │ │ ├── DeepSlice.coord_post_processing.plane_alignment_functions.rst.txt │ │ ├── DeepSlice.coord_post_processing.rst.txt │ │ ├── DeepSlice.metadata.rst.txt │ │ ├── DeepSlice.neural_network.rst.txt │ │ ├── DeepSlice.read_and_write.rst.txt │ │ ├── DeepSlice.rst.txt │ │ ├── index.rst.txt │ │ └── modules.rst.txt │ │ ├── _static │ │ ├── _sphinx_javascript_frameworks_compat.js │ │ ├── alabaster.css │ │ ├── basic.css │ │ ├── css │ │ │ ├── badge_only.css │ │ │ ├── fonts │ │ │ │ ├── Roboto-Slab-Bold.woff │ │ │ │ ├── Roboto-Slab-Bold.woff2 │ │ │ │ ├── Roboto-Slab-Regular.woff │ │ │ │ ├── Roboto-Slab-Regular.woff2 │ │ │ │ ├── fontawesome-webfont.eot │ │ │ │ ├── fontawesome-webfont.svg │ │ │ │ ├── fontawesome-webfont.ttf │ │ │ │ ├── fontawesome-webfont.woff │ │ │ │ ├── fontawesome-webfont.woff2 │ │ │ │ ├── lato-bold-italic.woff │ │ │ │ ├── lato-bold-italic.woff2 │ │ │ │ ├── lato-bold.woff │ │ │ │ ├── lato-bold.woff2 │ │ │ │ ├── lato-normal-italic.woff │ │ │ │ ├── lato-normal-italic.woff2 │ │ │ │ ├── lato-normal.woff │ │ │ │ └── lato-normal.woff2 │ │ │ └── theme.css │ │ ├── custom.css │ │ ├── doctools.js │ │ ├── documentation_options.js │ │ ├── file.png │ │ ├── jquery-3.6.0.js │ │ ├── jquery.js │ │ ├── js │ │ │ ├── badge_only.js │ │ │ ├── html5shiv-printshiv.min.js │ │ │ ├── html5shiv.min.js │ │ │ └── theme.js │ │ ├── language_data.js │ │ ├── minus.png │ │ ├── plus.png │ │ ├── pygments.css │ │ ├── searchtools.js │ │ ├── sphinx_highlight.js │ │ ├── underscore-1.13.1.js │ │ └── underscore.js │ │ ├── genindex.html │ │ ├── index.html │ │ ├── modules.html │ │ ├── objects.inv │ │ ├── py-modindex.html │ │ ├── search.html │ │ └── searchindex.js ├── conf.py ├── images │ ├── DeepSlice_github_banner.png │ └── process.PNG ├── index.rst ├── make.bat └── modules.rst ├── examples ├── example_brain │ └── GLTa │ │ ├── 641_2002_2567_NM01_s104.png │ │ ├── 641_2002_2568_NM01_s004.png │ │ ├── 641_2002_2568_NM01_s014.png │ │ ├── 641_2002_2568_NM01_s024.png │ │ ├── 641_2002_2568_NM01_s034.png │ │ ├── 641_2002_2568_NM01_s039.png │ │ ├── 641_2002_2568_NM01_s044.png │ │ ├── 641_2002_2568_NM01_s049.png │ │ ├── 641_2002_2568_NM01_s054.png │ │ ├── 641_2002_2568_NM01_s059.png │ │ ├── 641_2002_2568_NM01_s064.png │ │ ├── 641_2002_2568_NM01_s069.png │ │ ├── 641_2002_2568_NM01_s074.png │ │ ├── 641_2002_2568_NM01_s079.png │ │ ├── 641_2002_2568_NM01_s084.png │ │ ├── 641_2002_2568_NM01_s089.png │ │ ├── 641_2002_2568_NM01_s094.png │ │ ├── 641_2002_2568_NM01_s099.png │ │ ├── 641_2002_2568_NM01_s109.png │ │ ├── 641_2002_2568_NM01_s114.png │ │ ├── 641_2002_2568_NM01_s119.png │ │ ├── 641_2002_2568_NM01_s124.png │ │ ├── 641_2002_2568_NM01_s129.png │ │ ├── 641_2002_2568_NM01_s134.png │ │ ├── 641_2002_2568_NM01_s139.png │ │ ├── 641_2002_2568_NM01_s144.png │ │ ├── 641_2002_2568_NM01_s154.png │ │ ├── 641_2002_2568_NM01_s159.png │ │ ├── 641_2002_2568_NM01_s164.png │ │ ├── 641_2002_2568_NM01_s169.png │ │ ├── 641_2002_2568_NM01_s174.png │ │ ├── 641_2002_2568_NM01_s179.png │ │ ├── 641_2002_2568_NM01_s184.png │ │ ├── 641_2002_2568_NM01_s189.png │ │ ├── 641_2002_2568_NM01_s199.png │ │ ├── GLTa.csv │ │ ├── GLTa.json │ │ ├── GLTa.xml │ │ ├── MyResults.csv │ │ ├── MyResults.json │ │ └── MyResults.xml └── example_notebooks │ └── DeepSlice_example.ipynb ├── setup.cfg └── setup.py /.gitattributes: -------------------------------------------------------------------------------- 1 | *.nii filter=lfs diff=lfs merge=lfs -text 2 | -------------------------------------------------------------------------------- /.github/workflows/DeepSliceTests.yml: -------------------------------------------------------------------------------- 1 | name: DeepSlice tests using the provided conda env 2 | 3 | on: [push] 4 | 5 | jobs: 6 | build-linux: 7 | runs-on: ubuntu-latest 8 | strategy: 9 | max-parallel: 5 10 | 11 | steps: 12 | - uses: actions/checkout@v2 13 | - name: Set up Python 3.7 14 | uses: actions/setup-python@v2 15 | with: 16 | python-version: 3.7 17 | - name: Add conda to system path 18 | run: | 19 | # $CONDA is an environment variable pointing to the root of the miniconda directory 20 | echo $CONDA/bin >> $GITHUB_PATH 21 | - name: Install dependencies 22 | run: | 23 | conda env update --file conda_environments/DS-CPU.yml --name base 24 | - name: Lint with flake8 25 | run: | 26 | conda install flake8 27 | # stop the build if there are Python syntax errors or undefined names 28 | flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics 29 | # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide 30 | flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics 31 | -------------------------------------------------------------------------------- /.github/workflows/ebrains.yml: -------------------------------------------------------------------------------- 1 | name: Mirror to Ebrains 2 | 3 | on: 4 | push: 5 | branches: [ main ] 6 | 7 | 8 | jobs: 9 | # set the job name 10 | to_ebrains: 11 | runs-on: ubuntu-latest 12 | steps: 13 | 14 | - name: syncmain 15 | uses: wei/git-sync@v3 16 | 17 | with: 18 | source_repo: "PolarBean/DeepSlice" 19 | source_branch: "main" 20 | destination_repo: "https://ghpusher:${{ secrets.EBRAINS_GITLAB_ACCESS_TOKEN }}@gitlab.ebrains.eu/polarbean/DeepSlice.git" 21 | destination_branch: "main" 22 | 23 | -------------------------------------------------------------------------------- /.github/workflows/python-publish.yml: -------------------------------------------------------------------------------- 1 | # This workflow will upload a Python Package using Twine when a release is created 2 | # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries 3 | 4 | # This workflow uses actions that are not certified by GitHub. 5 | # They are provided by a third-party and are governed by 6 | # separate terms of service, privacy policy, and support 7 | # documentation. 8 | 9 | name: Upload Python Package 10 | 11 | on: 12 | release: 13 | types: [published] 14 | 15 | permissions: 16 | contents: read 17 | 18 | jobs: 19 | deploy: 20 | 21 | runs-on: ubuntu-latest 22 | 23 | steps: 24 | - uses: actions/checkout@v3 25 | - name: Set up Python 26 | uses: actions/setup-python@v3 27 | with: 28 | python-version: '3.x' 29 | - name: Extract tag name 30 | id: tag 31 | run: echo ::set-output name=TAG_NAME::$(echo $GITHUB_REF | cut -d / -f 3) 32 | - name: Update version in setup.py 33 | run: >- 34 | sed -i "s/{{VERSION_PLACEHOLDER}}/${{ steps.tag.outputs.TAG_NAME }}/g" setup.py 35 | - name: Install dependencies 36 | run: | 37 | python -m pip install --upgrade pip 38 | pip install build 39 | - name: Build package 40 | run: python -m build 41 | - name: Publish package 42 | uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 43 | with: 44 | user: __token__ 45 | password: ${{ secrets.PYPI_API_TOKEN }} 46 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | Download.csv 3 | Download.xml 4 | utilities/__pycache__/QuickNII_functions.cpython-39.pyc 5 | utilities/adult_to_p28_test.xml.csv 6 | utilities/adult_to_p28_test.xml.xml 7 | utilities/C110_deepslice2.xml 8 | DS-test.py 9 | DS-test.py 10 | utilities/__pycache__/plane_alignment.cpython-37.pyc 11 | utilities/__pycache__/QuickNII_functions.cpython-37.pyc 12 | *.pyc 13 | *.pyc 14 | DeepSlice/metadata/volumes/*.nii 15 | DeepSlice/metadata/weights/*.h5 16 | DeepSlice/metadata/weights/*.hdf5 17 | 18 | dist 19 | # Distribution / packaging 20 | bin/ 21 | build/ 22 | develop-eggs/ 23 | dist/ 24 | eggs/ 25 | lib/ 26 | lib64/ 27 | parts/ 28 | sdist/ 29 | var/ 30 | *.egg-info/ 31 | .installed.cfg 32 | *.egg 33 | 34 | # Installer logs 35 | pip-log.txt 36 | pip-delete-this-directory.txt 37 | DeepSlice.egg-info 38 | test.py 39 | .vscode/settings.json 40 | -------------------------------------------------------------------------------- /DeepSlice/__init__.py: -------------------------------------------------------------------------------- 1 | from .main import DSModel 2 | -------------------------------------------------------------------------------- /DeepSlice/coord_post_processing/__init__.py: -------------------------------------------------------------------------------- 1 | from . import * 2 | -------------------------------------------------------------------------------- /DeepSlice/coord_post_processing/angle_methods.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | from .plane_alignment_functions import plane_alignment 3 | from .depth_estimation import calculate_brain_center_depths 4 | 5 | 6 | def calculate_brain_center_coordinate(section, atlas_shape, axis): 7 | """ 8 | Calculates the coordinate closest to the middle of the section as defined by the two 9 | dimensions not orthogonal to the dimension along which the series is being aligned. 10 | for example, if the series is being aligned coronally then this will return the midpoint 11 | in X and Z as coronal series are spaced along the Y coordinate in the CCF. 12 | 13 | :param section: The section to calculate the center for 14 | :param atlas_shape: The shape of the atlas 15 | :param axis: The axis along which the series is being aligned ('sagittal', 'coronal', 'horizontal') 16 | :return: The coordinate closest to the middle of the section 17 | """ 18 | if axis not in ["sagittal", "coronal", "horizontal"]: 19 | raise ValueError("axis must be one of sagittal, coronal, or horizontal") 20 | cross, k = plane_alignment.find_plane_equation(section) 21 | if axis == "sagittal": 22 | center_point = ( 23 | ((atlas_shape[1] / 2) * cross[1]) + ((atlas_shape[2] / 2) * cross[2]) + k 24 | ) 25 | center_point_value = -(center_point / cross[0]) 26 | elif axis == "coronal": 27 | center_point = ( 28 | ((atlas_shape[0] / 2) * cross[0]) + ((atlas_shape[2] / 2) * cross[2]) + k 29 | ) 30 | center_point_value = -(center_point / cross[1]) 31 | elif axis == "horizontal": 32 | center_point = ( 33 | ((atlas_shape[0] / 2) * cross[0]) + ((atlas_shape[1] / 2) * cross[1]) + k 34 | ) 35 | center_point_value = -(center_point / cross[2]) 36 | return center_point_value 37 | 38 | 39 | def calculate_angles(df): 40 | """ 41 | Calculates the Mediolateral and Dorsoventral angles for a series of predictions 42 | 43 | :param df: The dataframe containing the predictions 44 | :type df: pandas.DataFrame 45 | :return: a list of calculated ML and DV angles 46 | :rtype: list[float], list[float] 47 | """ 48 | DV_list, ML_list = [], [] 49 | for alignment in df.iterrows(): 50 | # the quickNII coordinate vector 51 | m = alignment[1][ 52 | ["ox", "oy", "oz", "ux", "uy", "uz", "vx", "vy", "vz"] 53 | ].values.astype(np.float64) 54 | cross, k = plane_alignment.find_plane_equation(m) 55 | # calculate the Mediolateral and Dorsoventral angles 56 | DV = plane_alignment.get_angle(m, cross, k, "DV") 57 | ML = plane_alignment.get_angle(m, cross, k, "ML") 58 | # add the angles to the dataframe as new columns 59 | DV_list.append(DV) 60 | ML_list.append(ML) 61 | return DV_list, ML_list 62 | 63 | 64 | def get_mean_angle(DV_list, ML_list, method, depths=None, species=None): 65 | """ 66 | Propagates the Mediolateral and Dorsoventral angles for a series of predictions 67 | :param df: The dataframe containing the predictions 68 | :param method: The method used to calculate mean angles ('mean', 'weighted_mean') 69 | :param species: The species of the subject being aligned ('rat', 'mouse') 70 | :type df: pandas.DataFrame 71 | :type method: str 72 | :return: The calculated DV and ML angles 73 | :rtype: float, float 74 | """ 75 | if method == "mean": 76 | DV_angle = np.mean(DV_list) 77 | ML_angle = np.mean(ML_list) 78 | elif method == "weighted_mean": 79 | df_center = depths 80 | if species == "mouse": 81 | min, max = 0, 528 82 | elif species == "rat": 83 | min, max = 0, 1024 84 | if len(df_center) > 2: 85 | weighted_accuracy = plane_alignment.make_gaussian_weights(max) 86 | else: 87 | weighted_accuracy = [1.0] * len(df_center) 88 | df_center = np.array(df_center) 89 | df_center[df_center < min] = min 90 | df_center[df_center > max] = max - 1 91 | weighted_accuracy = [weighted_accuracy[int(y)] for y in df_center] 92 | DV_angle = np.average(DV_list, weights=weighted_accuracy) 93 | ML_angle = np.average(ML_list, weights=weighted_accuracy) 94 | else: 95 | raise ValueError("method must be one of 'mean' or 'weighted_mean'") 96 | return DV_angle, ML_angle 97 | 98 | 99 | def propagate_angles(df, method, species): 100 | """ 101 | Propagates the Mediolateral and Dorsoventral angles for a series of predictions 102 | :param df: The dataframe containing the predictions 103 | :type df: pandas.DataFrame 104 | :return: an adjusted dataframe with the propagated angles 105 | :rtype: pandas.DataFrame 106 | """ 107 | # get the angles for each section in the dataset 108 | temp = df.copy() 109 | if "bad_section" in temp: 110 | temp = temp[~temp["bad_section"].astype(bool)] 111 | DV_angle_list, ML_angle_list = calculate_angles(temp) 112 | 113 | depths = calculate_brain_center_depths( 114 | temp[["ox", "oy", "oz", "ux", "uy", "uz", "vx", "vy", "vz"]] 115 | ) 116 | 117 | DV_angle, ML_angle = get_mean_angle( 118 | DV_angle_list, ML_angle_list, method, depths, species 119 | ) 120 | print(f"DV angle: {DV_angle}\nML angle: {ML_angle}") 121 | # adjust the angles for each section in the dataset 122 | df = set_angles(df, DV_angle, ML_angle) 123 | return df 124 | 125 | 126 | def set_angles(df, DV_angle, ML_angle): 127 | """ 128 | Sets the Mediolateral and Dorsoventral angles for a series of predictions 129 | :param df: The dataframe containing the predictions 130 | :type df: pandas.DataFrame 131 | :return: an adjusted dataframe with the propagated angles 132 | :rtype: pandas.DataFrame 133 | """ 134 | # adjust the angles for each section 135 | columns = ["ox", "oy", "oz", "ux", "uy", "uz", "vx", "vy", "vz"] 136 | sections = [] 137 | for section in df[columns].iterrows(): 138 | section = np.array(section[1]) 139 | section = plane_alignment.section_adjust(section, mean=DV_angle, direction="DV") 140 | section = plane_alignment.section_adjust(section, mean=ML_angle, direction="ML") 141 | sections.append(section) 142 | df[columns] = sections 143 | return df 144 | -------------------------------------------------------------------------------- /DeepSlice/coord_post_processing/depth_estimation.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | from .plane_alignment_functions import plane_alignment 3 | 4 | 5 | def calculate_brain_center_depth(section): 6 | """ 7 | Calculates the depth of the brain center for a given section 8 | 9 | :param section: the section coordinates as an array consisting of Oxyz,Uxyz,Vxyz 10 | :type section: np.array 11 | :return: the depth of the brain center 12 | :rtype: float 13 | """ 14 | cross, k = plane_alignment.find_plane_equation(section) 15 | translated_volume = np.array((456, 0, 320)) 16 | linear_point = ( 17 | ((translated_volume[0] / 2) * cross[0]) 18 | + ((translated_volume[2] / 2) * cross[2]) 19 | ) + k 20 | depth = -(linear_point / cross[1]) 21 | return depth 22 | 23 | 24 | def calculate_brain_center_depths(predictions): 25 | """ 26 | Calculates the depths of the brain center for a series of predictions 27 | 28 | :param predictions: dataframe of predictions 29 | :type predictions: pandas.DataFrame 30 | :return: a list of depths 31 | :rtype: list[float] 32 | """ 33 | depths = [] 34 | for prediction in predictions[ 35 | ["ox", "oy", "oz", "ux", "uy", "uz", "vx", "vy", "vz"] 36 | ].values: 37 | depths.append(calculate_brain_center_depth(prediction)) 38 | return depths 39 | -------------------------------------------------------------------------------- /DeepSlice/coord_post_processing/plane_alignment_functions/__init__.py: -------------------------------------------------------------------------------- 1 | from . import * 2 | -------------------------------------------------------------------------------- /DeepSlice/main.py: -------------------------------------------------------------------------------- 1 | from typing import Union 2 | from .coord_post_processing import spacing_and_indexing, angle_methods 3 | from .read_and_write import QuickNII_functions 4 | from .neural_network import neural_network 5 | from .metadata import metadata_loader 6 | 7 | 8 | class DSModel: 9 | def __init__(self, species): 10 | """Initialises a DeepSlice model for a given species 11 | :param species: the species of the brain to be processed, must be one of "mouse", "rat" 12 | :type species: str 13 | """ 14 | self.species = species 15 | 16 | self.config, self.metadata_path = metadata_loader.load_config() 17 | xception_weights = metadata_loader.get_data_path( 18 | self.config["weight_file_paths"]["xception_imagenet"], self.metadata_path 19 | ) 20 | weights = metadata_loader.get_data_path( 21 | self.config["weight_file_paths"][self.species]["primary"], 22 | self.metadata_path, 23 | ) 24 | self.model = neural_network.initialise_network( 25 | xception_weights, weights, self.species 26 | ) 27 | 28 | def predict( 29 | self, 30 | image_directory: str = None, 31 | ensemble: bool = None, 32 | section_numbers: bool = True, 33 | legacy_section_numbers=False, 34 | image_list=None, 35 | use_secondary_model=False, 36 | ): 37 | """predicts the atlas position for a folder full of histological brain sections 38 | 39 | :param image_directory: the directory containing the brain sections 40 | :type image_directory: str 41 | :param ensemble: whether to use multiple models, this will default to True when available, defaults to None 42 | :type ensemble: bool, optional 43 | :param section_numbers: whether this dataset includes section numbers (as the last three digits of the filename) , defaults to True 44 | :type section_numbers: bool, optional 45 | :param legacy_section_numbers: a legacy setting which parses section numbers how old DeepSlice used to, defaults to False 46 | :type legacy_section_numbers: bool, optional 47 | """ 48 | 49 | # We set this to false as predict is the entry point for a new brain and therefore we need to reset all values which may persist from a previous animal. 50 | self.bad_sections_present = False 51 | # Different species may or may not have an ensemble model, so we need to check for this before defaulting to True 52 | if ensemble == None: 53 | ensemble = self.config["ensemble_status"][self.species] 54 | ensemble = eval(ensemble) 55 | if image_list: 56 | image_generator, width, height = neural_network.load_images_from_list( 57 | image_list 58 | ) 59 | if image_directory: 60 | print( 61 | "WARNING: image_directory is set but image_list is also set. image_directory will be ignored." 62 | ) 63 | else: 64 | image_generator, width, height = neural_network.load_images_from_path( 65 | image_directory 66 | ) 67 | primary_weights = metadata_loader.get_data_path( 68 | self.config["weight_file_paths"][self.species]["primary"], 69 | self.metadata_path, 70 | ) 71 | 72 | secondary_weights = metadata_loader.get_data_path( 73 | self.config["weight_file_paths"][self.species]["secondary"], 74 | self.metadata_path, 75 | ) 76 | 77 | if secondary_weights == "None": 78 | print(f"ensemble is not available for {self.species}") 79 | if use_secondary_model: 80 | print( 81 | "WARNING: use_secondary_model is set but no secondary model is available. use_secondary_model will be ignored." 82 | ) 83 | use_secondary_model = False 84 | ensemble = False 85 | if use_secondary_model and ensemble: 86 | print( 87 | "WARNING: use_secondary_model is set but ensemble is also set. use_secondary_model will be ignored." 88 | ) 89 | use_secondary_model = False 90 | if use_secondary_model: 91 | print("Using secondary model") 92 | predictions = neural_network.predictions_util( 93 | self.model, 94 | image_generator, 95 | secondary_weights, 96 | None, 97 | ensemble, 98 | self.species, 99 | ) 100 | else: 101 | predictions = neural_network.predictions_util( 102 | self.model, 103 | image_generator, 104 | primary_weights, 105 | secondary_weights, 106 | ensemble, 107 | self.species, 108 | ) 109 | predictions["width"] = width 110 | predictions["height"] = height 111 | if section_numbers: 112 | predictions["nr"] = spacing_and_indexing.number_sections( 113 | predictions["Filenames"], legacy_section_numbers 114 | ) 115 | predictions["nr"] = predictions["nr"].astype(int) 116 | predictions = predictions.sort_values(by="nr").reset_index(drop=True) 117 | else: 118 | ###this is just for coronal, change later 119 | predictions = predictions.sort_values(by="oy").reset_index(drop=True) 120 | 121 | #: pd.DataFrame: Filenames and predicted QuickNII coordinates of the input sections. 122 | 123 | self.predictions = predictions 124 | self.image_directory = image_directory 125 | 126 | def set_bad_sections(self, bad_sections: list, auto=False): 127 | """ 128 | sets the bad sections for a given brain. Must be run after predict() 129 | 130 | :param bad_sections: A list of bad sections to ignore when calculating angles and spacing, the list just needs to contain a unique string for each section, for instance the section number. do not use a string which appears in multiple filenames 131 | :type bad_sections: list 132 | """ 133 | self.predictions = spacing_and_indexing.set_bad_sections_util( 134 | self.predictions, bad_sections, auto 135 | ) 136 | 137 | def enforce_index_order(self): 138 | """ 139 | reorders the section depths (oy) in the predictions such that they align with the section indexes 140 | """ 141 | self.predictions = spacing_and_indexing.enforce_section_ordering( 142 | self.predictions 143 | ) 144 | 145 | def enforce_index_spacing( 146 | self, section_thickness: Union[int, float] = None, suppress=False 147 | ): 148 | """ 149 | Space evenly according to the section indexes, if these indexes do not represent the precise order in which the sections were 150 | cut, this will lead to less accurate predictions. Section indexes must account for missing sections (ie, if section 3 is missing 151 | indexes must be 1, 2, 4). 152 | 153 | :param section_thickness: the thickness of the sections in microns, defaults to None 154 | :type section_thickness: Union[int, float], optional 155 | """ 156 | voxel_size = self.config["target_volumes"][self.species]["voxel_size_microns"] 157 | self.predictions = spacing_and_indexing.space_according_to_index( 158 | self.predictions, 159 | section_thickness=section_thickness, 160 | voxel_size=voxel_size, 161 | suppress=suppress, 162 | species=self.species, 163 | ) 164 | 165 | def adjust_angles(self, ML: Union[int, float], DV: Union[int, float]): 166 | """ 167 | Adjusts the Mediolateral (ML) and Dorsoventral (DV) angles of all sections to the specified values. 168 | 169 | :param ML: the Mediolateral angle to set 170 | :param DV: the Dorsoventral angle to set 171 | :type ML: [int, float] 172 | :type DV: [int, float] 173 | """ 174 | self.predictions = angle_methods.set_angles(self.predictions, ML, DV) 175 | 176 | def propagate_angles(self, method="weighted_mean"): 177 | """ 178 | Calculates the average Mediolateral and Dorsoventral angles for all sections. 179 | """ 180 | ##needs to be run twice as adjusting the angle in one plane bumps the other out slightly. 181 | for i in range(2): 182 | self.predictions = angle_methods.propagate_angles( 183 | self.predictions, method, self.species 184 | ) 185 | 186 | def load_QUINT(self, filename): 187 | """ 188 | Load a QUINT compatible JSON or XML. 189 | 190 | :param filename: the name of the file to load 191 | :type filename: str 192 | """ 193 | if filename.lower().endswith(".json"): 194 | predictions, target = QuickNII_functions.read_QUINT_JSON(filename) 195 | if target == "ABA_Mouse_CCFv3_2017_25um.cutlas" and self.species != "mouse": 196 | self.species = "mouse" 197 | print("Switching to a mouse model") 198 | elif target == "WHS_Rat_v4_39um.cutlas" and self.species != "rat": 199 | self.species = "rat" 200 | print("switching to a rat model") 201 | elif filename.lower().endswith(".xml"): 202 | predictions = QuickNII_functions.read_QuickNII_XML(filename) 203 | else: 204 | raise ValueError("File must be a JSON or XML") 205 | self.predictions = predictions 206 | xception_weights = metadata_loader.get_data_path( 207 | self.config["weight_file_paths"]["xception_imagenet"], self.metadata_path 208 | ) 209 | weights = metadata_loader.get_data_path( 210 | self.config["weight_file_paths"][self.species]["primary"], 211 | self.metadata_path, 212 | ) 213 | self.model = neural_network.initialise_network( 214 | xception_weights, weights, self.species 215 | ) 216 | 217 | def save_predictions(self, filename): 218 | """ 219 | Save the predictions to a QuickNII compatible JSON file. 220 | 221 | :param filename: the name of the file to save to 222 | :type filename: str 223 | """ 224 | target = self.config["target_volumes"][self.species]["name"] 225 | aligner = self.config["DeepSlice_version"]["prerelease"] 226 | self.predictions.to_csv(filename + ".csv", index=False) 227 | QuickNII_functions.write_QUINT_JSON( 228 | df=self.predictions, filename=filename, aligner=aligner, target=target 229 | ) 230 | -------------------------------------------------------------------------------- /DeepSlice/metadata/__init__.py: -------------------------------------------------------------------------------- 1 | from . import * 2 | -------------------------------------------------------------------------------- /DeepSlice/metadata/config.json: -------------------------------------------------------------------------------- 1 | {"weight_file_paths":{ 2 | "mouse":{ 3 | "primary":{"path":"weights/Allen_Mixed_Best.h5","url":"https://data-proxy.ebrains.eu/api/v1/buckets/deepslice/weights/Allen_Mixed_Best.h5"}, 4 | "secondary":{"path":"weights/Synthetic_data_final.hdf5", "url":"https://data-proxy.ebrains.eu/api/v1/buckets/deepslice/weights/Synthetic_data_final.hdf5"} 5 | }, 6 | 7 | "rat":{ 8 | "primary":{"path":"weights/RatModelInProgress.h5","url":"https://data-proxy.ebrains.eu/api/v1/buckets/deepslice/weights/RatModelInProgress.h5"}, 9 | "secondary":{"path":"weights/RatModelScratch.h5", "url":"https://data-proxy.ebrains.eu/api/v1/buckets/deepslice/weights/RatModelScratch.h5"} 10 | }, 11 | "xception_imagenet":{"path":"weights/xception_weights_tf_dim_ordering_tf_kernels.h5", "url":"https://data-proxy.ebrains.eu/api/v1/buckets/deepslice/weights/xception_weights_tf_dim_ordering_tf_kernels.h5"} 12 | }, 13 | "ensemble_status":{ 14 | "mouse":"True", 15 | "rat":"False" 16 | }, 17 | "target_volumes":{ 18 | "mouse":{"name":"ABA_Mouse_CCFv3_2017_25um.cutlas","voxel_size_microns":25}, 19 | "rat": {"name":"WHS_Rat_v4_39um.cutlas", "voxel_size_microns":39} 20 | }, 21 | "DeepSlice_version":{ 22 | "stable":"stable_0.3.0", 23 | "prerelease":"prerelease_1.0.0" 24 | }, 25 | "volume_paths":{ 26 | "mouse":{ 27 | "nissl":{"path":"volumes/ara_nissl_25.nii", 28 | "url":"https://data-proxy.ebrains.eu/api/v1/buckets/deepslice/volumes/ara_nissl_25.nii"}, 29 | "stpt":{"path":"volumes/average_template_25.nii", 30 | "url":"https://data-proxy.ebrains.eu/api/v1/buckets/deepslice/volumes/average_template_25.nii"} 31 | }, 32 | "rat":{"path":"WHS_SD_rat_T2star_v1.01.nii","url":"https://data-proxy.ebrains.eu/api/v1/buckets/deepslice/volumes/WHS_SD_rat_T2star_v1.01.nii"} 33 | }, 34 | "default_volumes":{ 35 | "mouse":"nissl", 36 | "rat":"MRI" 37 | } 38 | } -------------------------------------------------------------------------------- /DeepSlice/metadata/metadata_loader.py: -------------------------------------------------------------------------------- 1 | import json 2 | from pathlib import Path 3 | import requests 4 | import os 5 | 6 | 7 | def load_config() -> dict: 8 | """ 9 | Loads the config file 10 | 11 | :return: the config file 12 | :rtype: dict 13 | """ 14 | path = str(Path(__file__).parent) + os.sep 15 | with open(path + "config.json", "r") as f: 16 | config = json.loads(f.read()) 17 | return config, path 18 | 19 | 20 | def download_file(url: str, path: str): 21 | """ 22 | Downloads a file from a url to a path 23 | 24 | :param url: the url of the file to download 25 | :type url: str 26 | :param path: the path to save the file to 27 | :type path: str 28 | """ 29 | print("Downloading file from " + url + " to " + path) 30 | r = requests.get(url, allow_redirects=True) 31 | open(path, "wb").write(r.content) 32 | 33 | 34 | def get_data_path(url_path_dict, path): 35 | """ 36 | If the data is not present, download it from the DeepSlice github. Else return the path to the data. 37 | 38 | :param url_path_dict: a dictionary of a url and path to the data 39 | :type url_path_dict: dict 40 | :param path: the path to the DeepSlice metadata directory 41 | :type path: str 42 | :return: the path to the data 43 | :rtype: str 44 | """ 45 | if not os.path.exists(path + url_path_dict["path"]): 46 | download_file(url_path_dict["url"], path + url_path_dict["path"]) 47 | return path + url_path_dict["path"] 48 | -------------------------------------------------------------------------------- /DeepSlice/metadata/volumes/placeholder.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/DeepSlice/metadata/volumes/placeholder.txt -------------------------------------------------------------------------------- /DeepSlice/metadata/weights/placeholder.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/DeepSlice/metadata/weights/placeholder.txt -------------------------------------------------------------------------------- /DeepSlice/neural_network/__init__.py: -------------------------------------------------------------------------------- 1 | from . import * 2 | -------------------------------------------------------------------------------- /DeepSlice/neural_network/network_architecture.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/DeepSlice/neural_network/network_architecture.py -------------------------------------------------------------------------------- /DeepSlice/neural_network/neural_network.py: -------------------------------------------------------------------------------- 1 | from tensorflow.keras.models import Sequential 2 | from tensorflow.keras.layers import Dense, Input 3 | from tensorflow.keras import Model 4 | import tensorflow as tf 5 | from tensorflow.keras.applications.xception import Xception 6 | from tensorflow.keras.preprocessing.image import ImageDataGenerator 7 | from glob import glob 8 | import pandas as pd 9 | import numpy as np 10 | import os 11 | from skimage.color import rgb2gray 12 | import warnings 13 | import imghdr 14 | import struct 15 | import h5py 16 | 17 | 18 | def gray_scale(img: np.ndarray) -> np.ndarray: 19 | """ 20 | Convert the image to grayscale 21 | 22 | :param img: The image to convert 23 | :type img: numpy.ndarray 24 | :return: The converted image 25 | :rtype: numpy.ndarray 26 | """ 27 | img = rgb2gray(img).reshape(299, 299, 1) 28 | return img 29 | 30 | 31 | def initialise_network(xception_weights: str, weights: str, species: str) -> Sequential: 32 | """ 33 | Initialise a neural network with the given weights 34 | 35 | :param weights: The weights for the network 36 | :type weights: list 37 | :param species: The species of the animal, this is necessary because of a previous error where the models are slightly different for different species 38 | :return: The initialised neural network 39 | :rtype: keras.models.Sequential 40 | """ 41 | base_model = Xception(include_top=True, weights=xception_weights) 42 | 43 | if species == "rat": 44 | inputs = Input(shape=(299, 299, 3)) 45 | base_model_layer = base_model(inputs, training=True) 46 | dense1_layer = Dense(256, activation="relu")(base_model_layer) 47 | dense2_layer = Dense(256, activation="relu")(dense1_layer) 48 | output_layer = Dense(9, activation="linear")(dense2_layer) 49 | model = Model(inputs=inputs, outputs=output_layer) 50 | else: 51 | model = Sequential() 52 | model.add(base_model) 53 | model.add(Dense(256, activation="relu")) 54 | model.add(Dense(256, activation="relu")) 55 | model.add(Dense(9, activation="linear")) 56 | 57 | if weights != None: 58 | model = load_xception_weights(model, weights, species) 59 | return model 60 | 61 | 62 | def load_xception_weights(model, weights, species="mouse"): 63 | with h5py.File(weights, "r") as new: 64 | # set weight of each layer manually 65 | if species == "mouse": 66 | xception_idx = 0 67 | dense_idx = 1 68 | elif species == "rat": 69 | # RatModelInProgress.h5 has an "input_2" layer at index 0, so we need to adjust the indices< 70 | xception_idx = 1 71 | dense_idx = 2 72 | 73 | model.layers[dense_idx].set_weights( 74 | [new["dense"]["dense"]["kernel:0"], new["dense"]["dense"]["bias:0"]] 75 | ) 76 | model.layers[dense_idx + 1].set_weights( 77 | [new["dense_1"]["dense_1"]["kernel:0"], new["dense_1"]["dense_1"]["bias:0"]] 78 | ) 79 | model.layers[dense_idx + 2].set_weights( 80 | [new["dense_2"]["dense_2"]["kernel:0"], new["dense_2"]["dense_2"]["bias:0"]] 81 | ) 82 | 83 | # Set the weights of the xception model 84 | weight_names = new["xception"].attrs["weight_names"].tolist() 85 | weight_names_layers = [ 86 | name.decode("utf-8").split("/")[0] for name in weight_names 87 | ] 88 | 89 | for i in range(len(model.layers[xception_idx].layers)): 90 | name_of_layer = model.layers[xception_idx].layers[i].name 91 | # if layer name is in the weight names, then we will set weights 92 | if name_of_layer in weight_names_layers: 93 | # Get name of weights in the layer 94 | layer_weight_names = [] 95 | for weight in model.layers[xception_idx].layers[i].weights: 96 | layer_weight_names.append(weight.name.split("/")[1]) 97 | h5_group = new["xception"][name_of_layer] 98 | weights_list = [np.array(h5_group[kk]) for kk in layer_weight_names] 99 | model.layers[xception_idx].layers[i].set_weights(weights_list) 100 | return model 101 | 102 | 103 | def load_images_from_path(image_path: str) -> np.ndarray: 104 | """ 105 | Load the images from the given path 106 | :param image_path: The path to the images 107 | :type image_path: str 108 | :return: an Image generator for the found images 109 | :rtype: keras.preprocessing.image.ImageDataGenerator 110 | """ 111 | if not os.path.isdir(image_path): 112 | raise ValueError("The path provided is not a directory") 113 | valid_formats = [".jpg", ".jpeg", ".png"] 114 | images = glob(image_path + "/*") 115 | 116 | images = [i for i in images if os.path.splitext(i)[1].lower() in valid_formats] 117 | sizes = [get_image_size(i) for i in images] 118 | width = [i[0] for i in sizes] 119 | height = [i[1] for i in sizes] 120 | if len(images) == 0: 121 | raise ValueError( 122 | f"No images found in the directory, please ensure image files are one of the following formats: {', '.join(valid_formats)}" 123 | ) 124 | image_df = pd.DataFrame({"Filenames": images}) 125 | with warnings.catch_warnings(): 126 | ##throws warning about samplewise_std_normalization conflicting with samplewise_center which we don't use. 127 | warnings.simplefilter("ignore") 128 | image_generator = ImageDataGenerator( 129 | preprocessing_function=gray_scale, samplewise_std_normalization=True 130 | ).flow_from_dataframe( 131 | image_df, 132 | x_col="Filenames", 133 | y_col=None, 134 | target_size=(299, 299), 135 | batch_size=1, 136 | colormode="rgb", 137 | shuffle=False, 138 | class_mode=None, 139 | ) 140 | return image_generator, width, height 141 | 142 | 143 | def load_images_from_list(image_list: list) -> np.ndarray: 144 | """ 145 | Load the images from the given list 146 | :param image_list: The list of images 147 | :type image_list: list 148 | :return: an Image generator for the found images 149 | :rtype: keras.preprocessing.image.ImageDataGenerator 150 | """ 151 | valid_formats = [".jpg", ".jpeg", ".png"] 152 | images = [i for i in image_list if os.path.splitext(i)[1].lower() in valid_formats] 153 | sizes = [get_image_size(i) for i in images] 154 | width = [i[0] for i in sizes] 155 | height = [i[1] for i in sizes] 156 | if len(images) == 0: 157 | raise ValueError( 158 | f"No images found in the directory, please ensure image files are one of the following formats: {', '.join(valid_formats)}" 159 | ) 160 | image_df = pd.DataFrame({"Filenames": images}) 161 | with warnings.catch_warnings(): 162 | ##throws warning about samplewise_std_normalization conflicting with samplewise_center which we don't use. 163 | warnings.simplefilter("ignore") 164 | image_generator = ImageDataGenerator( 165 | preprocessing_function=gray_scale, samplewise_std_normalization=True 166 | ).flow_from_dataframe( 167 | image_df, 168 | x_col="Filenames", 169 | y_col=None, 170 | target_size=(299, 299), 171 | batch_size=1, 172 | colormode="rgb", 173 | shuffle=False, 174 | class_mode=None, 175 | ) 176 | return image_generator, width, height 177 | 178 | 179 | def predictions_util( 180 | model: Sequential, 181 | image_generator: ImageDataGenerator, 182 | primary_weights: str, 183 | secondary_weights: str, 184 | ensemble: bool = False, 185 | species: str = "mouse", 186 | ): 187 | """ 188 | Predict the image alignments 189 | 190 | :param model: The model to use for prediction 191 | :param image_generator: The image generator to use for prediction 192 | :type model: keras.models.Sequential 193 | :type image_generator: keras.preprocessing.image.ImageDataGenerator 194 | :return: The predicted alignments 195 | :rtype: list 196 | """ 197 | model = load_xception_weights(model, primary_weights, species) 198 | predictions = model.predict( 199 | image_generator, 200 | steps=image_generator.n // image_generator.batch_size, 201 | verbose=1, 202 | ) 203 | predictions = predictions.astype(np.float64) 204 | if ensemble: 205 | image_generator.reset() 206 | model = load_xception_weights(model, secondary_weights, species) 207 | secondary_predictions = model.predict( 208 | image_generator, 209 | steps=image_generator.n // image_generator.batch_size, 210 | verbose=1, 211 | ) 212 | predictions = np.mean([predictions, secondary_predictions], axis=0) 213 | model = load_xception_weights(model, primary_weights, species) 214 | filenames = image_generator.filenames 215 | filenames = [os.path.basename(i) for i in filenames] 216 | predictions_df = pd.DataFrame( 217 | { 218 | "Filenames": filenames, 219 | "ox": predictions[:, 0], 220 | "oy": predictions[:, 1], 221 | "oz": predictions[:, 2], 222 | "ux": predictions[:, 3], 223 | "uy": predictions[:, 4], 224 | "uz": predictions[:, 5], 225 | "vx": predictions[:, 6], 226 | "vy": predictions[:, 7], 227 | "vz": predictions[:, 8], 228 | } 229 | ) 230 | 231 | return predictions_df 232 | 233 | 234 | def get_image_size(fname): 235 | # https://stackoverflow.com/questions/8032642/how-to-obtain-image-size-using-standard-python-class-without-using-external-lib 236 | """Determine the image type of fhandle and return its size. 237 | from draco""" 238 | with open(fname, "rb") as fhandle: 239 | head = fhandle.read(24) 240 | if len(head) != 24: 241 | raise Exception("Invalid header") 242 | 243 | ext = imghdr.what(fname) 244 | if imghdr.what(fname) == "png": 245 | check = struct.unpack(">i", head[4:8])[0] 246 | if check != 0x0D0A1A0A: 247 | raise Exception("png checksum failed") 248 | width, height = struct.unpack(">ii", head[16:24]) 249 | elif imghdr.what(fname) == "gif": 250 | width, height = struct.unpack("H", fhandle.read(2))[0] - 2 262 | # We are at a SOFn block 263 | fhandle.seek(1, 1) # Skip `precision' byte. 264 | height, width = struct.unpack(">HH", fhandle.read(4)) 265 | else: 266 | raise Exception(f"Invalid filetype: {head}") 267 | return width, height 268 | -------------------------------------------------------------------------------- /DeepSlice/read_and_write/QuickNII_functions.py: -------------------------------------------------------------------------------- 1 | import pandas as pd 2 | import xml.etree.ElementTree as ET 3 | import json 4 | import numpy as np 5 | 6 | 7 | def write_QuickNII_XML(df: pd.DataFrame, filename: str, aligner: str) -> None: 8 | """ 9 | Converts a pandas DataFrame to a quickNII compatible XML 10 | """ 11 | df_temp = df.copy() 12 | if "nr" not in df_temp.columns: 13 | df_temp["nr"] = np.arange(len(df_temp)) + 1 14 | df_temp[["ox", "oy", "oz", "ux", "uy", "uz", "vx", "vy", "vz", "nr"]] = df[ 15 | ["ox", "oy", "oz", "ux", "uy", "uz", "vx", "vy", "vz", "nr"] 16 | ].astype(str) 17 | out_df = pd.DataFrame( 18 | { 19 | "anchoring": "ox=" 20 | + (df_temp.ox) 21 | + "&oy=" 22 | + (df_temp.oy) 23 | + "&oz=" 24 | + (df_temp.oz) 25 | + "&ux=" 26 | + (df_temp.ux) 27 | + "&uy=" 28 | + (df_temp.uy) 29 | + "&uz=" 30 | + (df_temp.uz) 31 | + "&vx=" 32 | + (df_temp.vx) 33 | + "&vy=" 34 | + (df_temp.vy) 35 | + "&vz=" 36 | + (df_temp.vz), 37 | "filename": df_temp.Filenames, 38 | "height": df_temp.height, 39 | "width": df_temp.width, 40 | "nr": df_temp.nr, 41 | } 42 | ) 43 | print(f"saving to {filename}.xml") 44 | 45 | out_df.to_xml( 46 | filename + ".xml", 47 | index=False, 48 | root_name="series", 49 | row_name="slice", 50 | attr_cols=list(out_df.columns), 51 | namespaces={ 52 | "first": df_temp.nr.values[0], 53 | "last": df_temp.nr.values[-1], 54 | "name": filename, 55 | "aligner": aligner, 56 | "": "", 57 | }, 58 | ) 59 | 60 | 61 | def read_QuickNII_XML(filename: str) -> pd.DataFrame: 62 | """ 63 | Converts a QuickNII XML to a pandas dataframe 64 | 65 | :param xml: The path to the QuickNII XML 66 | :type xml: str 67 | :return: A pandas dataframe 68 | :rtype: pd.DataFrame 69 | """ 70 | df = pd.read_xml(filename) 71 | # split the anchoring string into separate columns 72 | anchoring = df.anchoring.str.split("&", expand=True).values 73 | # lambda function to remove non_numeric characters besides '.', we need this as all the 'ox=' etc is still in the strings 74 | strip = lambda x: "".join( 75 | c for c in x if c.isdigit() or c == "." or c == "-" or c == "e" 76 | ) 77 | ##vectorise the lambda function and apply it to all elements 78 | anchoring = np.vectorize(strip)(anchoring) 79 | anchoring = anchoring.astype(np.float64) 80 | out_df = pd.DataFrame({"Filenames": df.filename}) 81 | out_df[["ox", "oy", "oz", "ux", "uy", "uz", "vx", "vy", "vz"]] = anchoring 82 | return out_df 83 | 84 | 85 | def write_QUINT_JSON( 86 | df: pd.DataFrame, filename: str, aligner: str, target: str 87 | ) -> None: 88 | """ 89 | Converts a pandas DataFrame to a QUINT (QuickNII, Visualign, & Nutil) compatible JSON 90 | """ 91 | if "nr" not in df.columns: 92 | df["nr"] = np.arange(len(df)) + 1 93 | alignments = df[["ox", "oy", "oz", "ux", "uy", "uz", "vx", "vy", "vz"]].values 94 | if "markers" in df.columns: 95 | markers = df.markers.values 96 | else: 97 | markers = [[]] * len(df) 98 | print(len(markers)) 99 | alignment_metadata = [ 100 | { 101 | "filename": fn, 102 | "anchoring": list(alignment), 103 | "height": h, 104 | "width": w, 105 | "nr": nr, 106 | "markers": marker[0] if len(marker) > 0 else [], 107 | } 108 | for fn, alignment, nr, marker, h, w in zip( 109 | df.Filenames, alignments, df.nr, markers, df.height, df.width 110 | ) 111 | ] 112 | QUINT_json = { 113 | "name": "", 114 | "target": target, 115 | "aligner": aligner, 116 | "slices": alignment_metadata, 117 | } 118 | print(f"saving to {filename}.json") 119 | with open(filename + ".json", "w") as f: 120 | json.dump(QUINT_json, f) 121 | with open(filename + ".json", "w") as outfile: 122 | json.dump(QUINT_json, outfile) 123 | 124 | 125 | def read_QUINT_JSON(filename: str) -> pd.DataFrame: 126 | """ 127 | Converts a QUINT JSON to a pandas dataframe 128 | 129 | :param json: The path to the QUINT JSON 130 | :type json: str 131 | :return: A pandas dataframe 132 | :rtype: pd.DataFrame 133 | """ 134 | with open(filename, "r") as f: 135 | data = json.load(f) 136 | sections = data["slices"] 137 | target_volume = data["target"] 138 | alignments = [ 139 | row["anchoring"] if "anchoring" in row else 9 * [np.nan] for row in sections 140 | ] 141 | height = [row["height"] if "height" in row else [] for row in sections] 142 | width = [row["width"] if "width" in row else [] for row in sections] 143 | filenames = [row["filename"] if "filename" in row else [] for row in sections] 144 | section_numbers = [row["nr"] if "nr" in row else [] for row in sections] 145 | markers = [row["markers"] if "markers" in row else [] for row in sections] 146 | df = pd.DataFrame({"Filenames": filenames, "nr": section_numbers}) 147 | df[["ox", "oy", "oz", "ux", "uy", "uz", "vx", "vy", "vz"]] = alignments 148 | df["markers"] = markers 149 | df["height"] = height 150 | df["width"] = width 151 | return df, target_volume 152 | -------------------------------------------------------------------------------- /DeepSlice/read_and_write/__init__.py: -------------------------------------------------------------------------------- 1 | from . import * 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Harry Carey 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | [![DOI](https://zenodo.org/badge/274122364.svg)](https://zenodo.org/badge/latestdoi/274122364) 4 | ![PyPI - Version](https://img.shields.io/pypi/v/DeepSlice) 5 | ![PyPI - Downloads](https://img.shields.io/pypi/dm/DeepSlice) 6 | ![Pepy Total Downloads](https://img.shields.io/pepy/dt/DeepSlice) 7 | 8 | 9 | ![Alt](docs/images/DeepSlice_github_banner.png "DeepSlice Banner") 10 | DeepSlice is a python library which automatically aligns mouse histology with the allen brain atlas common coordinate framework (and now rat brain histology to the Waxholm rat brain atlas, though this is in beta). 11 | The alignments are viewable, and refinable, using the [QuickNII](https://www.nitrc.org/projects/quicknii "QuickNII") software package. 12 | DeepSlice requires no preprocessing and works on any stain, however we have found it performs best on brightfield images. 13 | At present one limitation is that it only works on Coronally cut sections, we will release an update in the future for sagittal and horizontally cut histology. 14 | ![Alt](docs/images/process.PNG) 15 | DeepSlice automates the process of identifying exactly where in the brain a section lies, it can accomodate non-orthogonal cutting planes and will produce an image specific annotation for each section in your brain. 16 | ## Citation 17 | If you use DeepSlice in your work please cite [Carey et al, 2023](https://www.nature.com/articles/s41467-023-41645-4). It may also be useful if you mention the version you use :) 18 | 19 | In addition, you should also remember to cite [Wang et al, 2020](https://doi.org/10.1016/j.cell.2020.04.007) if you use the Allen CCFv3 atlas for the Mouse model and [Kleven et al, 2023](https://www.nature.com/articles/s41592-023-02034-3) if you use the Waxholm Atlas of the Sprague Dawley Rat for the Rat model. 20 | 21 | ## Workflow 22 | DeepSlice is fully integrated with the QUINT workflow. Quint helps you register, segment and quantify brain wide datasets!   🐭🧠🔬💻🤖 23 | 24 | ## Web Application 25 | If you would like to use DeepSlice but don't need your own personal installation, check out [**DeepSlice Flask**](https://www.DeepSlice.com.au), a web application which will allow you to upload your dataset and download the aligned results. Some more advanced options are only available in the Python package. The web interface was developed by [Michael Pegios](https://github.com/ThermoDev/). 26 | ## [Installation: How to install DeepSlice](#installation) 27 | 28 | ## [Usage: How to align using DeepSlice](#basic-usage) 29 | ## [For a jupyter notebook example check out](examples/example_notebooks/DeepSlice_example.ipynb) 30 | 31 | **Happy Aligning :)** 32 | 33 | 34 |
35 | 36 | 37 | 38 |

Installation

39 | 40 | 41 |

From PIP

42 | This is the easy and recommended way to install DeepSlice, first make sure you have Python 3.11 installed and then simply: 43 | 44 | ```bash 45 | pip install DeepSlice 46 | ``` 47 | And you're ready to go! 🚀 Check out the PyPi package [here](https://pypi.org/project/DeepSlice/) 48 | 49 | If you run into any problems create a github issue and I will help you solve it. 50 | 51 |
52 | 53 | 54 | # Basic Usage 55 | ## On start 56 | After cloning our repo and navigating into the directory open an ipython session and import our package. 57 | ```python 58 | from DeepSlice import DSModel 59 | ``` 60 | Next, specify the species you would like to use and initiate the model. 61 | ```python 62 | species = 'mouse' #available species are 'mouse' and 'rat' 63 | 64 | Model = DSModel(species) 65 | ``` 66 | 67 | --- 68 | **Important** 69 | 70 | * Sections in a folder must all be from the same brain 71 | 72 | * DeepSlice uses all the sections you select to inform its prediction of section angle. Thus it is important that you do not include sections which lie outside of the Allen Brain Atlas. This include extremely rostral olfactory bulb and caudal medulla. **If you include these sections in your selected folder it will reduce the quality of all the predictions**. 73 | * If you are not using the web version and would like to include these sections in your alignment, you can now label them as "bad sections" (see below), which will tell DeepSlice not to weight these sections in the propagation. 74 | 75 | * The sections do not need to be in any kind of order. 76 | 77 | * The model downsamples images to 299x299, you do not need to worry about this but be aware that there is no benefit from using higher resolutions. 78 | 79 | ------ 80 | 81 | ## Predictions 82 | 83 | Now your model is ready to use, just direct it towards the folder containing the images you would like to align. 84 |
eg: 85 | ```bash 86 | 87 | ├── your_brain_folder 88 | │ ├── brain_slice_1.png 89 | │ ├── brain_slice_2.png 90 | │ ├── brain_slice_3.png 91 | ``` 92 | In this parent directory there should be only one sub folder, in this example this is "your_brain_folder". 93 |
To align these images using DeepSlice simply call 94 | ```python 95 | folderpath = 'examples/example_brain/GLTa/' 96 | #here you run the model on your folder 97 | #try with and without ensemble to find the model which best works for you 98 | #if you have section numbers included in the filename as _sXXX specify this :) 99 | Model.predict(folderpath, ensemble=True, section_numbers=True) 100 | #This is an optional stage if you have damaged sections, or hemibrains they may negatively effect the 101 | #propagation for the entire dataset simply set the bad sections here using a string which is unique to 102 | #those each section you would like to label as bad. DeepSlice will not include it in the propagation 103 | #and instead it will infer its position based on neighbouring sections. 104 | Model.set_bad_sections(bad_sections=["_s094", "s199"]) 105 | #If you would like to normalise the angles (you should) 106 | Model.propagate_angles() 107 | #To reorder your sections according to the section numbers 108 | Model.enforce_index_order() 109 | #alternatively if you know the precise spacing (ie; 1, 2, 4, indicates that section 3 has been left out. 110 | #Furthermore if you know the exact section thickness in microns this can be included instead of None 111 | #if your sections are numbered rostral to caudal you will need to specify a negative section_thickness 112 | Model.enforce_index_spacing(section_thickness = None) 113 | #now we save which will produce a json file which can be placed in the same directory as your images 114 | #and then opened with QuickNII. 115 | Model.save_predictions(folderpath + 'MyResults') 116 | 117 | 118 | 119 | ``` 120 | ## Acknowledgements 121 | We are grateful to Ann Goodchild for her time-saving blunt assessments of many failed prototypes, for the motivation provided by Dr William Redmond, and especially to Veronica Downs, Freja Warner Van Dijk and Jayme McCutcheon, whose Novice alignments were instrumental to this work. We would like to thank Gergely Csúcs for providing his expertise and many atlasing tools. Work in the authors’ laboratories is supported by the National Health & Medical Research Council of Australia, the Hillcrest Foundation, and Macquarie University (SMcM), and from the European Union’s Horizon 2020 Framework Program for Research and Innovation under the Specific Grant Agreement No. 945539 (Human Brain Project SGA3) and the Research Council of Norway under Grant Agreement No. 269774 (INCF, JGB). We are grateful to Macquarie University for access to their HPC resources, essential for production of early DeepSlice prototypes. 122 | 123 | 124 | 125 | -------------------------------------------------------------------------------- /docs/DeepSlice.rst: -------------------------------------------------------------------------------- 1 | DeepSlice package 2 | ================= 3 | 4 | Module contents 5 | --------------- 6 | 7 | .. automodule:: DeepSlice 8 | :members: 9 | :undoc-members: 10 | :show-inheritance: 11 | -------------------------------------------------------------------------------- /docs/Makefile: -------------------------------------------------------------------------------- 1 | # Minimal makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line, and also 5 | # from the environment for the first two. 6 | SPHINXOPTS ?= 7 | SPHINXBUILD ?= sphinx-build 8 | SOURCEDIR = . 9 | BUILDDIR = _build 10 | 11 | # Put it first so that "make" without argument is like "make help". 12 | help: 13 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 14 | 15 | .PHONY: help Makefile 16 | 17 | # Catch-all target: route all unknown targets to Sphinx using the new 18 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). 19 | %: Makefile 20 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 21 | -------------------------------------------------------------------------------- /docs/_build/doctrees/DeepSlice.coord_post_processing.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/docs/_build/doctrees/DeepSlice.coord_post_processing.doctree -------------------------------------------------------------------------------- /docs/_build/doctrees/DeepSlice.coord_post_processing.plane_alignment_functions.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/docs/_build/doctrees/DeepSlice.coord_post_processing.plane_alignment_functions.doctree -------------------------------------------------------------------------------- /docs/_build/doctrees/DeepSlice.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/docs/_build/doctrees/DeepSlice.doctree -------------------------------------------------------------------------------- /docs/_build/doctrees/DeepSlice.metadata.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/docs/_build/doctrees/DeepSlice.metadata.doctree -------------------------------------------------------------------------------- /docs/_build/doctrees/DeepSlice.neural_network.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/docs/_build/doctrees/DeepSlice.neural_network.doctree -------------------------------------------------------------------------------- /docs/_build/doctrees/DeepSlice.read_and_write.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/docs/_build/doctrees/DeepSlice.read_and_write.doctree -------------------------------------------------------------------------------- /docs/_build/doctrees/environment.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/docs/_build/doctrees/environment.pickle -------------------------------------------------------------------------------- /docs/_build/doctrees/index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/docs/_build/doctrees/index.doctree -------------------------------------------------------------------------------- /docs/_build/doctrees/modules.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/docs/_build/doctrees/modules.doctree -------------------------------------------------------------------------------- /docs/_build/html/.buildinfo: -------------------------------------------------------------------------------- 1 | # Sphinx build info version 1 2 | # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. 3 | config: 98a1775c28443a36a6c9cd8ebb1f851b 4 | tags: 645f666f9bcd5a90fca523b33c5a78b7 5 | -------------------------------------------------------------------------------- /docs/_build/html/_sources/DeepSlice.coord_post_processing.plane_alignment_functions.rst.txt: -------------------------------------------------------------------------------- 1 | DeepSlice.coord\_post\_processing.plane\_alignment\_functions package 2 | ===================================================================== 3 | 4 | Submodules 5 | ---------- 6 | 7 | DeepSlice.coord\_post\_processing.plane\_alignment\_functions.plane\_alignment module 8 | ------------------------------------------------------------------------------------- 9 | 10 | .. automodule:: DeepSlice.coord_post_processing.plane_alignment_functions.plane_alignment 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | Module contents 16 | --------------- 17 | 18 | .. automodule:: DeepSlice.coord_post_processing.plane_alignment_functions 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | -------------------------------------------------------------------------------- /docs/_build/html/_sources/DeepSlice.coord_post_processing.rst.txt: -------------------------------------------------------------------------------- 1 | DeepSlice.coord\_post\_processing package 2 | ========================================= 3 | 4 | Subpackages 5 | ----------- 6 | 7 | .. toctree:: 8 | :maxdepth: 4 9 | 10 | DeepSlice.coord_post_processing.plane_alignment_functions 11 | 12 | Submodules 13 | ---------- 14 | 15 | DeepSlice.coord\_post\_processing.angle\_methods module 16 | ------------------------------------------------------- 17 | 18 | .. automodule:: DeepSlice.coord_post_processing.angle_methods 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | DeepSlice.coord\_post\_processing.depth\_estimation module 24 | ---------------------------------------------------------- 25 | 26 | .. automodule:: DeepSlice.coord_post_processing.depth_estimation 27 | :members: 28 | :undoc-members: 29 | :show-inheritance: 30 | 31 | DeepSlice.coord\_post\_processing.spacing\_and\_indexing module 32 | --------------------------------------------------------------- 33 | 34 | .. automodule:: DeepSlice.coord_post_processing.spacing_and_indexing 35 | :members: 36 | :undoc-members: 37 | :show-inheritance: 38 | 39 | Module contents 40 | --------------- 41 | 42 | .. automodule:: DeepSlice.coord_post_processing 43 | :members: 44 | :undoc-members: 45 | :show-inheritance: 46 | -------------------------------------------------------------------------------- /docs/_build/html/_sources/DeepSlice.metadata.rst.txt: -------------------------------------------------------------------------------- 1 | DeepSlice.metadata package 2 | ========================== 3 | 4 | Submodules 5 | ---------- 6 | 7 | DeepSlice.metadata.metadata\_loader module 8 | ------------------------------------------ 9 | 10 | .. automodule:: DeepSlice.metadata.metadata_loader 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | Module contents 16 | --------------- 17 | 18 | .. automodule:: DeepSlice.metadata 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | -------------------------------------------------------------------------------- /docs/_build/html/_sources/DeepSlice.neural_network.rst.txt: -------------------------------------------------------------------------------- 1 | DeepSlice.neural\_network package 2 | ================================= 3 | 4 | Submodules 5 | ---------- 6 | 7 | DeepSlice.neural\_network.network\_architecture module 8 | ------------------------------------------------------ 9 | 10 | .. automodule:: DeepSlice.neural_network.network_architecture 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | DeepSlice.neural\_network.neural\_network module 16 | ------------------------------------------------ 17 | 18 | .. automodule:: DeepSlice.neural_network.neural_network 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | 23 | Module contents 24 | --------------- 25 | 26 | .. automodule:: DeepSlice.neural_network 27 | :members: 28 | :undoc-members: 29 | :show-inheritance: 30 | -------------------------------------------------------------------------------- /docs/_build/html/_sources/DeepSlice.read_and_write.rst.txt: -------------------------------------------------------------------------------- 1 | DeepSlice.read\_and\_write package 2 | ================================== 3 | 4 | Submodules 5 | ---------- 6 | 7 | DeepSlice.read\_and\_write.QuickNII\_functions module 8 | ----------------------------------------------------- 9 | 10 | .. automodule:: DeepSlice.read_and_write.QuickNII_functions 11 | :members: 12 | :undoc-members: 13 | :show-inheritance: 14 | 15 | Module contents 16 | --------------- 17 | 18 | .. automodule:: DeepSlice.read_and_write 19 | :members: 20 | :undoc-members: 21 | :show-inheritance: 22 | -------------------------------------------------------------------------------- /docs/_build/html/_sources/DeepSlice.rst.txt: -------------------------------------------------------------------------------- 1 | DeepSlice package 2 | ================= 3 | 4 | Module contents 5 | --------------- 6 | 7 | .. automodule:: DeepSlice 8 | :members: 9 | :undoc-members: 10 | :show-inheritance: 11 | -------------------------------------------------------------------------------- /docs/_build/html/_sources/index.rst.txt: -------------------------------------------------------------------------------- 1 | .. DeepSlice documentation master file, created by 2 | sphinx-quickstart on Mon Mar 20 15:10:49 2023. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | Welcome to DeepSlice's documentation! 7 | ===================================== 8 | .. automodule:: DeepSlice.DSModel 9 | :members: 10 | .. toctree:: 11 | :maxdepth: 1 12 | :caption: Contents: 13 | 14 | 15 | 16 | Indices and tables 17 | ================== 18 | 19 | * :ref:`genindex` 20 | * :ref:`modindex` 21 | * :ref:`search` 22 | 23 | 24 | -------------------------------------------------------------------------------- /docs/_build/html/_sources/modules.rst.txt: -------------------------------------------------------------------------------- 1 | DeepSlice 2 | ========= 3 | 4 | .. toctree:: 5 | :maxdepth: 0 6 | 7 | DeepSlice 8 | -------------------------------------------------------------------------------- /docs/_build/html/_static/_sphinx_javascript_frameworks_compat.js: -------------------------------------------------------------------------------- 1 | /* 2 | * _sphinx_javascript_frameworks_compat.js 3 | * ~~~~~~~~~~ 4 | * 5 | * Compatability shim for jQuery and underscores.js. 6 | * 7 | * WILL BE REMOVED IN Sphinx 6.0 8 | * xref RemovedInSphinx60Warning 9 | * 10 | */ 11 | 12 | /** 13 | * select a different prefix for underscore 14 | */ 15 | $u = _.noConflict(); 16 | 17 | 18 | /** 19 | * small helper function to urldecode strings 20 | * 21 | * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL 22 | */ 23 | jQuery.urldecode = function(x) { 24 | if (!x) { 25 | return x 26 | } 27 | return decodeURIComponent(x.replace(/\+/g, ' ')); 28 | }; 29 | 30 | /** 31 | * small helper function to urlencode strings 32 | */ 33 | jQuery.urlencode = encodeURIComponent; 34 | 35 | /** 36 | * This function returns the parsed url parameters of the 37 | * current request. Multiple values per key are supported, 38 | * it will always return arrays of strings for the value parts. 39 | */ 40 | jQuery.getQueryParameters = function(s) { 41 | if (typeof s === 'undefined') 42 | s = document.location.search; 43 | var parts = s.substr(s.indexOf('?') + 1).split('&'); 44 | var result = {}; 45 | for (var i = 0; i < parts.length; i++) { 46 | var tmp = parts[i].split('=', 2); 47 | var key = jQuery.urldecode(tmp[0]); 48 | var value = jQuery.urldecode(tmp[1]); 49 | if (key in result) 50 | result[key].push(value); 51 | else 52 | result[key] = [value]; 53 | } 54 | return result; 55 | }; 56 | 57 | /** 58 | * highlight a given string on a jquery object by wrapping it in 59 | * span elements with the given class name. 60 | */ 61 | jQuery.fn.highlightText = function(text, className) { 62 | function highlight(node, addItems) { 63 | if (node.nodeType === 3) { 64 | var val = node.nodeValue; 65 | var pos = val.toLowerCase().indexOf(text); 66 | if (pos >= 0 && 67 | !jQuery(node.parentNode).hasClass(className) && 68 | !jQuery(node.parentNode).hasClass("nohighlight")) { 69 | var span; 70 | var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg"); 71 | if (isInSVG) { 72 | span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); 73 | } else { 74 | span = document.createElement("span"); 75 | span.className = className; 76 | } 77 | span.appendChild(document.createTextNode(val.substr(pos, text.length))); 78 | node.parentNode.insertBefore(span, node.parentNode.insertBefore( 79 | document.createTextNode(val.substr(pos + text.length)), 80 | node.nextSibling)); 81 | node.nodeValue = val.substr(0, pos); 82 | if (isInSVG) { 83 | var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect"); 84 | var bbox = node.parentElement.getBBox(); 85 | rect.x.baseVal.value = bbox.x; 86 | rect.y.baseVal.value = bbox.y; 87 | rect.width.baseVal.value = bbox.width; 88 | rect.height.baseVal.value = bbox.height; 89 | rect.setAttribute('class', className); 90 | addItems.push({ 91 | "parent": node.parentNode, 92 | "target": rect}); 93 | } 94 | } 95 | } 96 | else if (!jQuery(node).is("button, select, textarea")) { 97 | jQuery.each(node.childNodes, function() { 98 | highlight(this, addItems); 99 | }); 100 | } 101 | } 102 | var addItems = []; 103 | var result = this.each(function() { 104 | highlight(this, addItems); 105 | }); 106 | for (var i = 0; i < addItems.length; ++i) { 107 | jQuery(addItems[i].parent).before(addItems[i].target); 108 | } 109 | return result; 110 | }; 111 | 112 | /* 113 | * backward compatibility for jQuery.browser 114 | * This will be supported until firefox bug is fixed. 115 | */ 116 | if (!jQuery.browser) { 117 | jQuery.uaMatch = function(ua) { 118 | ua = ua.toLowerCase(); 119 | 120 | var match = /(chrome)[ \/]([\w.]+)/.exec(ua) || 121 | /(webkit)[ \/]([\w.]+)/.exec(ua) || 122 | /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) || 123 | /(msie) ([\w.]+)/.exec(ua) || 124 | ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) || 125 | []; 126 | 127 | return { 128 | browser: match[ 1 ] || "", 129 | version: match[ 2 ] || "0" 130 | }; 131 | }; 132 | jQuery.browser = {}; 133 | jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true; 134 | } 135 | -------------------------------------------------------------------------------- /docs/_build/html/_static/css/badge_only.css: -------------------------------------------------------------------------------- 1 | .clearfix{*zoom:1}.clearfix:after,.clearfix:before{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-style:normal;font-weight:400;src:url(fonts/fontawesome-webfont.eot?674f50d287a8c48dc19ba404d20fe713?#iefix) format("embedded-opentype"),url(fonts/fontawesome-webfont.woff2?af7ae505a9eed503f8b8e6982036873e) format("woff2"),url(fonts/fontawesome-webfont.woff?fee66e712a8a08eef5805a46892932ad) format("woff"),url(fonts/fontawesome-webfont.ttf?b06871f281fee6b241d60582ae9369b9) format("truetype"),url(fonts/fontawesome-webfont.svg?912ec66d7572ff821749319396470bde#FontAwesome) format("svg")}.fa:before{font-family:FontAwesome;font-style:normal;font-weight:400;line-height:1}.fa:before,a .fa{text-decoration:inherit}.fa:before,a .fa,li .fa{display:inline-block}li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-.8em}ul.fas li .fa{width:.8em}ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before,.icon-book:before{content:"\f02d"}.fa-caret-down:before,.icon-caret-down:before{content:"\f0d7"}.fa-caret-up:before,.icon-caret-up:before{content:"\f0d8"}.fa-caret-left:before,.icon-caret-left:before{content:"\f0d9"}.fa-caret-right:before,.icon-caret-right:before{content:"\f0da"}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:Lato,proxima-nova,Helvetica Neue,Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60}.rst-versions .rst-current-version:after{clear:both;content:"";display:block}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book,.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up{height:auto;max-height:100%;overflow-y:scroll}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:grey;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:1px solid #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px;max-height:90%}.rst-versions.rst-badge .fa-book,.rst-versions.rst-badge .icon-book{float:none;line-height:30px}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book,.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge>.rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width:768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}} -------------------------------------------------------------------------------- /docs/_build/html/_static/css/fonts/Roboto-Slab-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/docs/_build/html/_static/css/fonts/Roboto-Slab-Bold.woff -------------------------------------------------------------------------------- /docs/_build/html/_static/css/fonts/Roboto-Slab-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/docs/_build/html/_static/css/fonts/Roboto-Slab-Bold.woff2 -------------------------------------------------------------------------------- /docs/_build/html/_static/css/fonts/Roboto-Slab-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/docs/_build/html/_static/css/fonts/Roboto-Slab-Regular.woff -------------------------------------------------------------------------------- /docs/_build/html/_static/css/fonts/Roboto-Slab-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/docs/_build/html/_static/css/fonts/Roboto-Slab-Regular.woff2 -------------------------------------------------------------------------------- /docs/_build/html/_static/css/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/docs/_build/html/_static/css/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /docs/_build/html/_static/css/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/docs/_build/html/_static/css/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /docs/_build/html/_static/css/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/docs/_build/html/_static/css/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /docs/_build/html/_static/css/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/docs/_build/html/_static/css/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /docs/_build/html/_static/css/fonts/lato-bold-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/docs/_build/html/_static/css/fonts/lato-bold-italic.woff -------------------------------------------------------------------------------- /docs/_build/html/_static/css/fonts/lato-bold-italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/docs/_build/html/_static/css/fonts/lato-bold-italic.woff2 -------------------------------------------------------------------------------- /docs/_build/html/_static/css/fonts/lato-bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/docs/_build/html/_static/css/fonts/lato-bold.woff -------------------------------------------------------------------------------- /docs/_build/html/_static/css/fonts/lato-bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/docs/_build/html/_static/css/fonts/lato-bold.woff2 -------------------------------------------------------------------------------- /docs/_build/html/_static/css/fonts/lato-normal-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/docs/_build/html/_static/css/fonts/lato-normal-italic.woff -------------------------------------------------------------------------------- /docs/_build/html/_static/css/fonts/lato-normal-italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/docs/_build/html/_static/css/fonts/lato-normal-italic.woff2 -------------------------------------------------------------------------------- /docs/_build/html/_static/css/fonts/lato-normal.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/docs/_build/html/_static/css/fonts/lato-normal.woff -------------------------------------------------------------------------------- /docs/_build/html/_static/css/fonts/lato-normal.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/docs/_build/html/_static/css/fonts/lato-normal.woff2 -------------------------------------------------------------------------------- /docs/_build/html/_static/custom.css: -------------------------------------------------------------------------------- 1 | /* This file intentionally left blank. */ 2 | -------------------------------------------------------------------------------- /docs/_build/html/_static/doctools.js: -------------------------------------------------------------------------------- 1 | /* 2 | * doctools.js 3 | * ~~~~~~~~~~~ 4 | * 5 | * Base JavaScript utilities for all Sphinx HTML documentation. 6 | * 7 | * :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. 8 | * :license: BSD, see LICENSE for details. 9 | * 10 | */ 11 | "use strict"; 12 | 13 | const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([ 14 | "TEXTAREA", 15 | "INPUT", 16 | "SELECT", 17 | "BUTTON", 18 | ]); 19 | 20 | const _ready = (callback) => { 21 | if (document.readyState !== "loading") { 22 | callback(); 23 | } else { 24 | document.addEventListener("DOMContentLoaded", callback); 25 | } 26 | }; 27 | 28 | /** 29 | * Small JavaScript module for the documentation. 30 | */ 31 | const Documentation = { 32 | init: () => { 33 | Documentation.initDomainIndexTable(); 34 | Documentation.initOnKeyListeners(); 35 | }, 36 | 37 | /** 38 | * i18n support 39 | */ 40 | TRANSLATIONS: {}, 41 | PLURAL_EXPR: (n) => (n === 1 ? 0 : 1), 42 | LOCALE: "unknown", 43 | 44 | // gettext and ngettext don't access this so that the functions 45 | // can safely bound to a different name (_ = Documentation.gettext) 46 | gettext: (string) => { 47 | const translated = Documentation.TRANSLATIONS[string]; 48 | switch (typeof translated) { 49 | case "undefined": 50 | return string; // no translation 51 | case "string": 52 | return translated; // translation exists 53 | default: 54 | return translated[0]; // (singular, plural) translation tuple exists 55 | } 56 | }, 57 | 58 | ngettext: (singular, plural, n) => { 59 | const translated = Documentation.TRANSLATIONS[singular]; 60 | if (typeof translated !== "undefined") 61 | return translated[Documentation.PLURAL_EXPR(n)]; 62 | return n === 1 ? singular : plural; 63 | }, 64 | 65 | addTranslations: (catalog) => { 66 | Object.assign(Documentation.TRANSLATIONS, catalog.messages); 67 | Documentation.PLURAL_EXPR = new Function( 68 | "n", 69 | `return (${catalog.plural_expr})` 70 | ); 71 | Documentation.LOCALE = catalog.locale; 72 | }, 73 | 74 | /** 75 | * helper function to focus on search bar 76 | */ 77 | focusSearchBar: () => { 78 | document.querySelectorAll("input[name=q]")[0]?.focus(); 79 | }, 80 | 81 | /** 82 | * Initialise the domain index toggle buttons 83 | */ 84 | initDomainIndexTable: () => { 85 | const toggler = (el) => { 86 | const idNumber = el.id.substr(7); 87 | const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`); 88 | if (el.src.substr(-9) === "minus.png") { 89 | el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`; 90 | toggledRows.forEach((el) => (el.style.display = "none")); 91 | } else { 92 | el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`; 93 | toggledRows.forEach((el) => (el.style.display = "")); 94 | } 95 | }; 96 | 97 | const togglerElements = document.querySelectorAll("img.toggler"); 98 | togglerElements.forEach((el) => 99 | el.addEventListener("click", (event) => toggler(event.currentTarget)) 100 | ); 101 | togglerElements.forEach((el) => (el.style.display = "")); 102 | if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler); 103 | }, 104 | 105 | initOnKeyListeners: () => { 106 | // only install a listener if it is really needed 107 | if ( 108 | !DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS && 109 | !DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS 110 | ) 111 | return; 112 | 113 | document.addEventListener("keydown", (event) => { 114 | // bail for input elements 115 | if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; 116 | // bail with special keys 117 | if (event.altKey || event.ctrlKey || event.metaKey) return; 118 | 119 | if (!event.shiftKey) { 120 | switch (event.key) { 121 | case "ArrowLeft": 122 | if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; 123 | 124 | const prevLink = document.querySelector('link[rel="prev"]'); 125 | if (prevLink && prevLink.href) { 126 | window.location.href = prevLink.href; 127 | event.preventDefault(); 128 | } 129 | break; 130 | case "ArrowRight": 131 | if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; 132 | 133 | const nextLink = document.querySelector('link[rel="next"]'); 134 | if (nextLink && nextLink.href) { 135 | window.location.href = nextLink.href; 136 | event.preventDefault(); 137 | } 138 | break; 139 | } 140 | } 141 | 142 | // some keyboard layouts may need Shift to get / 143 | switch (event.key) { 144 | case "/": 145 | if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break; 146 | Documentation.focusSearchBar(); 147 | event.preventDefault(); 148 | } 149 | }); 150 | }, 151 | }; 152 | 153 | // quick alias for translations 154 | const _ = Documentation.gettext; 155 | 156 | _ready(Documentation.init); 157 | -------------------------------------------------------------------------------- /docs/_build/html/_static/documentation_options.js: -------------------------------------------------------------------------------- 1 | var DOCUMENTATION_OPTIONS = { 2 | URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), 3 | VERSION: '1.0.10', 4 | LANGUAGE: 'en', 5 | COLLAPSE_INDEX: false, 6 | BUILDER: 'html', 7 | FILE_SUFFIX: '.html', 8 | LINK_SUFFIX: '.html', 9 | HAS_SOURCE: true, 10 | SOURCELINK_SUFFIX: '.txt', 11 | NAVIGATION_WITH_KEYS: false, 12 | SHOW_SEARCH_SUMMARY: true, 13 | ENABLE_SEARCH_SHORTCUTS: true, 14 | }; -------------------------------------------------------------------------------- /docs/_build/html/_static/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/docs/_build/html/_static/file.png -------------------------------------------------------------------------------- /docs/_build/html/_static/js/badge_only.js: -------------------------------------------------------------------------------- 1 | !function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=4)}({4:function(e,t,r){}}); -------------------------------------------------------------------------------- /docs/_build/html/_static/js/html5shiv-printshiv.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @preserve HTML5 Shiv 3.7.3-pre | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed 3 | */ 4 | !function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=y.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=y.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),y.elements=c+" "+a,j(b)}function f(a){var b=x[a[v]];return b||(b={},w++,a[v]=w,x[w]=b),b}function g(a,c,d){if(c||(c=b),q)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():u.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||t.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),q)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return y.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(y,b.frag)}function j(a){a||(a=b);var d=f(a);return!y.shivCSS||p||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),q||i(a,d),a}function k(a){for(var b,c=a.getElementsByTagName("*"),e=c.length,f=RegExp("^(?:"+d().join("|")+")$","i"),g=[];e--;)b=c[e],f.test(b.nodeName)&&g.push(b.applyElement(l(b)));return g}function l(a){for(var b,c=a.attributes,d=c.length,e=a.ownerDocument.createElement(A+":"+a.nodeName);d--;)b=c[d],b.specified&&e.setAttribute(b.nodeName,b.nodeValue);return e.style.cssText=a.style.cssText,e}function m(a){for(var b,c=a.split("{"),e=c.length,f=RegExp("(^|[\\s,>+~])("+d().join("|")+")(?=[[\\s,>+~#.:]|$)","gi"),g="$1"+A+"\\:$2";e--;)b=c[e]=c[e].split("}"),b[b.length-1]=b[b.length-1].replace(f,g),c[e]=b.join("}");return c.join("{")}function n(a){for(var b=a.length;b--;)a[b].removeNode()}function o(a){function b(){clearTimeout(g._removeSheetTimer),d&&d.removeNode(!0),d=null}var d,e,g=f(a),h=a.namespaces,i=a.parentWindow;return!B||a.printShived?a:("undefined"==typeof h[A]&&h.add(A),i.attachEvent("onbeforeprint",function(){b();for(var f,g,h,i=a.styleSheets,j=[],l=i.length,n=Array(l);l--;)n[l]=i[l];for(;h=n.pop();)if(!h.disabled&&z.test(h.media)){try{f=h.imports,g=f.length}catch(o){g=0}for(l=0;g>l;l++)n.push(f[l]);try{j.push(h.cssText)}catch(o){}}j=m(j.reverse().join("")),e=k(a),d=c(a,j)}),i.attachEvent("onafterprint",function(){n(e),clearTimeout(g._removeSheetTimer),g._removeSheetTimer=setTimeout(b,500)}),a.printShived=!0,a)}var p,q,r="3.7.3",s=a.html5||{},t=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,u=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,v="_html5shiv",w=0,x={};!function(){try{var a=b.createElement("a");a.innerHTML="",p="hidden"in a,q=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){p=!0,q=!0}}();var y={elements:s.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:r,shivCSS:s.shivCSS!==!1,supportsUnknownElements:q,shivMethods:s.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=y,j(b);var z=/^$|\b(?:all|print)\b/,A="html5shiv",B=!q&&function(){var c=b.documentElement;return!("undefined"==typeof b.namespaces||"undefined"==typeof b.parentWindow||"undefined"==typeof c.applyElement||"undefined"==typeof c.removeNode||"undefined"==typeof a.attachEvent)}();y.type+=" print",y.shivPrint=o,o(b),"object"==typeof module&&module.exports&&(module.exports=y)}("undefined"!=typeof window?window:this,document); -------------------------------------------------------------------------------- /docs/_build/html/_static/js/html5shiv.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @preserve HTML5 Shiv 3.7.3 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed 3 | */ 4 | !function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=t.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=t.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),t.elements=c+" "+a,j(b)}function f(a){var b=s[a[q]];return b||(b={},r++,a[q]=r,s[r]=b),b}function g(a,c,d){if(c||(c=b),l)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():p.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||o.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),l)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return t.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(t,b.frag)}function j(a){a||(a=b);var d=f(a);return!t.shivCSS||k||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),l||i(a,d),a}var k,l,m="3.7.3-pre",n=a.html5||{},o=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,p=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,q="_html5shiv",r=0,s={};!function(){try{var a=b.createElement("a");a.innerHTML="",k="hidden"in a,l=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){k=!0,l=!0}}();var t={elements:n.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:m,shivCSS:n.shivCSS!==!1,supportsUnknownElements:l,shivMethods:n.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=t,j(b),"object"==typeof module&&module.exports&&(module.exports=t)}("undefined"!=typeof window?window:this,document); -------------------------------------------------------------------------------- /docs/_build/html/_static/js/theme.js: -------------------------------------------------------------------------------- 1 | !function(n){var e={};function t(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return n[i].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=n,t.c=e,t.d=function(n,e,i){t.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:i})},t.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},t.t=function(n,e){if(1&e&&(n=t(n)),8&e)return n;if(4&e&&"object"==typeof n&&n&&n.__esModule)return n;var i=Object.create(null);if(t.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(var o in n)t.d(i,o,function(e){return n[e]}.bind(null,o));return i},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},t.p="",t(t.s=0)}([function(n,e,t){t(1),n.exports=t(3)},function(n,e,t){(function(){var e="undefined"!=typeof window?window.jQuery:t(2);n.exports.ThemeNav={navBar:null,win:null,winScroll:!1,winResize:!1,linkScroll:!1,winPosition:0,winHeight:null,docHeight:null,isRunning:!1,enable:function(n){var t=this;void 0===n&&(n=!0),t.isRunning||(t.isRunning=!0,e((function(e){t.init(e),t.reset(),t.win.on("hashchange",t.reset),n&&t.win.on("scroll",(function(){t.linkScroll||t.winScroll||(t.winScroll=!0,requestAnimationFrame((function(){t.onScroll()})))})),t.win.on("resize",(function(){t.winResize||(t.winResize=!0,requestAnimationFrame((function(){t.onResize()})))})),t.onResize()})))},enableSticky:function(){this.enable(!0)},init:function(n){n(document);var e=this;this.navBar=n("div.wy-side-scroll:first"),this.win=n(window),n(document).on("click","[data-toggle='wy-nav-top']",(function(){n("[data-toggle='wy-nav-shift']").toggleClass("shift"),n("[data-toggle='rst-versions']").toggleClass("shift")})).on("click",".wy-menu-vertical .current ul li a",(function(){var t=n(this);n("[data-toggle='wy-nav-shift']").removeClass("shift"),n("[data-toggle='rst-versions']").toggleClass("shift"),e.toggleCurrent(t),e.hashChange()})).on("click","[data-toggle='rst-current-version']",(function(){n("[data-toggle='rst-versions']").toggleClass("shift-up")})),n("table.docutils:not(.field-list,.footnote,.citation)").wrap("
"),n("table.docutils.footnote").wrap("
"),n("table.docutils.citation").wrap("
"),n(".wy-menu-vertical ul").not(".simple").siblings("a").each((function(){var t=n(this);expand=n(''),expand.on("click",(function(n){return e.toggleCurrent(t),n.stopPropagation(),!1})),t.prepend(expand)}))},reset:function(){var n=encodeURI(window.location.hash)||"#";try{var e=$(".wy-menu-vertical"),t=e.find('[href="'+n+'"]');if(0===t.length){var i=$('.document [id="'+n.substring(1)+'"]').closest("div.section");0===(t=e.find('[href="#'+i.attr("id")+'"]')).length&&(t=e.find('[href="#"]'))}if(t.length>0){$(".wy-menu-vertical .current").removeClass("current").attr("aria-expanded","false"),t.addClass("current").attr("aria-expanded","true"),t.closest("li.toctree-l1").parent().addClass("current").attr("aria-expanded","true");for(let n=1;n<=10;n++)t.closest("li.toctree-l"+n).addClass("current").attr("aria-expanded","true");t[0].scrollIntoView()}}catch(n){console.log("Error expanding nav for anchor",n)}},onScroll:function(){this.winScroll=!1;var n=this.win.scrollTop(),e=n+this.winHeight,t=this.navBar.scrollTop()+(n-this.winPosition);n<0||e>this.docHeight||(this.navBar.scrollTop(t),this.winPosition=n)},onResize:function(){this.winResize=!1,this.winHeight=this.win.height(),this.docHeight=$(document).height()},hashChange:function(){this.linkScroll=!0,this.win.one("hashchange",(function(){this.linkScroll=!1}))},toggleCurrent:function(n){var e=n.closest("li");e.siblings("li.current").removeClass("current").attr("aria-expanded","false"),e.siblings().find("li.current").removeClass("current").attr("aria-expanded","false");var t=e.find("> ul li");t.length&&(t.removeClass("current").attr("aria-expanded","false"),e.toggleClass("current").attr("aria-expanded",(function(n,e){return"true"==e?"false":"true"})))}},"undefined"!=typeof window&&(window.SphinxRtdTheme={Navigation:n.exports.ThemeNav,StickyNav:n.exports.ThemeNav}),function(){for(var n=0,e=["ms","moz","webkit","o"],t=0;t0 63 | var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1 64 | var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1 65 | var s_v = "^(" + C + ")?" + v; // vowel in stem 66 | 67 | this.stemWord = function (w) { 68 | var stem; 69 | var suffix; 70 | var firstch; 71 | var origword = w; 72 | 73 | if (w.length < 3) 74 | return w; 75 | 76 | var re; 77 | var re2; 78 | var re3; 79 | var re4; 80 | 81 | firstch = w.substr(0,1); 82 | if (firstch == "y") 83 | w = firstch.toUpperCase() + w.substr(1); 84 | 85 | // Step 1a 86 | re = /^(.+?)(ss|i)es$/; 87 | re2 = /^(.+?)([^s])s$/; 88 | 89 | if (re.test(w)) 90 | w = w.replace(re,"$1$2"); 91 | else if (re2.test(w)) 92 | w = w.replace(re2,"$1$2"); 93 | 94 | // Step 1b 95 | re = /^(.+?)eed$/; 96 | re2 = /^(.+?)(ed|ing)$/; 97 | if (re.test(w)) { 98 | var fp = re.exec(w); 99 | re = new RegExp(mgr0); 100 | if (re.test(fp[1])) { 101 | re = /.$/; 102 | w = w.replace(re,""); 103 | } 104 | } 105 | else if (re2.test(w)) { 106 | var fp = re2.exec(w); 107 | stem = fp[1]; 108 | re2 = new RegExp(s_v); 109 | if (re2.test(stem)) { 110 | w = stem; 111 | re2 = /(at|bl|iz)$/; 112 | re3 = new RegExp("([^aeiouylsz])\\1$"); 113 | re4 = new RegExp("^" + C + v + "[^aeiouwxy]$"); 114 | if (re2.test(w)) 115 | w = w + "e"; 116 | else if (re3.test(w)) { 117 | re = /.$/; 118 | w = w.replace(re,""); 119 | } 120 | else if (re4.test(w)) 121 | w = w + "e"; 122 | } 123 | } 124 | 125 | // Step 1c 126 | re = /^(.+?)y$/; 127 | if (re.test(w)) { 128 | var fp = re.exec(w); 129 | stem = fp[1]; 130 | re = new RegExp(s_v); 131 | if (re.test(stem)) 132 | w = stem + "i"; 133 | } 134 | 135 | // Step 2 136 | re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/; 137 | if (re.test(w)) { 138 | var fp = re.exec(w); 139 | stem = fp[1]; 140 | suffix = fp[2]; 141 | re = new RegExp(mgr0); 142 | if (re.test(stem)) 143 | w = stem + step2list[suffix]; 144 | } 145 | 146 | // Step 3 147 | re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/; 148 | if (re.test(w)) { 149 | var fp = re.exec(w); 150 | stem = fp[1]; 151 | suffix = fp[2]; 152 | re = new RegExp(mgr0); 153 | if (re.test(stem)) 154 | w = stem + step3list[suffix]; 155 | } 156 | 157 | // Step 4 158 | re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/; 159 | re2 = /^(.+?)(s|t)(ion)$/; 160 | if (re.test(w)) { 161 | var fp = re.exec(w); 162 | stem = fp[1]; 163 | re = new RegExp(mgr1); 164 | if (re.test(stem)) 165 | w = stem; 166 | } 167 | else if (re2.test(w)) { 168 | var fp = re2.exec(w); 169 | stem = fp[1] + fp[2]; 170 | re2 = new RegExp(mgr1); 171 | if (re2.test(stem)) 172 | w = stem; 173 | } 174 | 175 | // Step 5 176 | re = /^(.+?)e$/; 177 | if (re.test(w)) { 178 | var fp = re.exec(w); 179 | stem = fp[1]; 180 | re = new RegExp(mgr1); 181 | re2 = new RegExp(meq1); 182 | re3 = new RegExp("^" + C + v + "[^aeiouwxy]$"); 183 | if (re.test(stem) || (re2.test(stem) && !(re3.test(stem)))) 184 | w = stem; 185 | } 186 | re = /ll$/; 187 | re2 = new RegExp(mgr1); 188 | if (re.test(w) && re2.test(w)) { 189 | re = /.$/; 190 | w = w.replace(re,""); 191 | } 192 | 193 | // and turn initial Y back to y 194 | if (firstch == "y") 195 | w = firstch.toLowerCase() + w.substr(1); 196 | return w; 197 | } 198 | } 199 | 200 | -------------------------------------------------------------------------------- /docs/_build/html/_static/minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/docs/_build/html/_static/minus.png -------------------------------------------------------------------------------- /docs/_build/html/_static/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/docs/_build/html/_static/plus.png -------------------------------------------------------------------------------- /docs/_build/html/_static/pygments.css: -------------------------------------------------------------------------------- 1 | pre { line-height: 125%; } 2 | td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } 3 | span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } 4 | td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } 5 | span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } 6 | .highlight .hll { background-color: #ffffcc } 7 | .highlight { background: #f8f8f8; } 8 | .highlight .c { color: #3D7B7B; font-style: italic } /* Comment */ 9 | .highlight .err { border: 1px solid #FF0000 } /* Error */ 10 | .highlight .k { color: #008000; font-weight: bold } /* Keyword */ 11 | .highlight .o { color: #666666 } /* Operator */ 12 | .highlight .ch { color: #3D7B7B; font-style: italic } /* Comment.Hashbang */ 13 | .highlight .cm { color: #3D7B7B; font-style: italic } /* Comment.Multiline */ 14 | .highlight .cp { color: #9C6500 } /* Comment.Preproc */ 15 | .highlight .cpf { color: #3D7B7B; font-style: italic } /* Comment.PreprocFile */ 16 | .highlight .c1 { color: #3D7B7B; font-style: italic } /* Comment.Single */ 17 | .highlight .cs { color: #3D7B7B; font-style: italic } /* Comment.Special */ 18 | .highlight .gd { color: #A00000 } /* Generic.Deleted */ 19 | .highlight .ge { font-style: italic } /* Generic.Emph */ 20 | .highlight .gr { color: #E40000 } /* Generic.Error */ 21 | .highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ 22 | .highlight .gi { color: #008400 } /* Generic.Inserted */ 23 | .highlight .go { color: #717171 } /* Generic.Output */ 24 | .highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */ 25 | .highlight .gs { font-weight: bold } /* Generic.Strong */ 26 | .highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ 27 | .highlight .gt { color: #0044DD } /* Generic.Traceback */ 28 | .highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */ 29 | .highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */ 30 | .highlight .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */ 31 | .highlight .kp { color: #008000 } /* Keyword.Pseudo */ 32 | .highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */ 33 | .highlight .kt { color: #B00040 } /* Keyword.Type */ 34 | .highlight .m { color: #666666 } /* Literal.Number */ 35 | .highlight .s { color: #BA2121 } /* Literal.String */ 36 | .highlight .na { color: #687822 } /* Name.Attribute */ 37 | .highlight .nb { color: #008000 } /* Name.Builtin */ 38 | .highlight .nc { color: #0000FF; font-weight: bold } /* Name.Class */ 39 | .highlight .no { color: #880000 } /* Name.Constant */ 40 | .highlight .nd { color: #AA22FF } /* Name.Decorator */ 41 | .highlight .ni { color: #717171; font-weight: bold } /* Name.Entity */ 42 | .highlight .ne { color: #CB3F38; font-weight: bold } /* Name.Exception */ 43 | .highlight .nf { color: #0000FF } /* Name.Function */ 44 | .highlight .nl { color: #767600 } /* Name.Label */ 45 | .highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */ 46 | .highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */ 47 | .highlight .nv { color: #19177C } /* Name.Variable */ 48 | .highlight .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */ 49 | .highlight .w { color: #bbbbbb } /* Text.Whitespace */ 50 | .highlight .mb { color: #666666 } /* Literal.Number.Bin */ 51 | .highlight .mf { color: #666666 } /* Literal.Number.Float */ 52 | .highlight .mh { color: #666666 } /* Literal.Number.Hex */ 53 | .highlight .mi { color: #666666 } /* Literal.Number.Integer */ 54 | .highlight .mo { color: #666666 } /* Literal.Number.Oct */ 55 | .highlight .sa { color: #BA2121 } /* Literal.String.Affix */ 56 | .highlight .sb { color: #BA2121 } /* Literal.String.Backtick */ 57 | .highlight .sc { color: #BA2121 } /* Literal.String.Char */ 58 | .highlight .dl { color: #BA2121 } /* Literal.String.Delimiter */ 59 | .highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */ 60 | .highlight .s2 { color: #BA2121 } /* Literal.String.Double */ 61 | .highlight .se { color: #AA5D1F; font-weight: bold } /* Literal.String.Escape */ 62 | .highlight .sh { color: #BA2121 } /* Literal.String.Heredoc */ 63 | .highlight .si { color: #A45A77; font-weight: bold } /* Literal.String.Interpol */ 64 | .highlight .sx { color: #008000 } /* Literal.String.Other */ 65 | .highlight .sr { color: #A45A77 } /* Literal.String.Regex */ 66 | .highlight .s1 { color: #BA2121 } /* Literal.String.Single */ 67 | .highlight .ss { color: #19177C } /* Literal.String.Symbol */ 68 | .highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */ 69 | .highlight .fm { color: #0000FF } /* Name.Function.Magic */ 70 | .highlight .vc { color: #19177C } /* Name.Variable.Class */ 71 | .highlight .vg { color: #19177C } /* Name.Variable.Global */ 72 | .highlight .vi { color: #19177C } /* Name.Variable.Instance */ 73 | .highlight .vm { color: #19177C } /* Name.Variable.Magic */ 74 | .highlight .il { color: #666666 } /* Literal.Number.Integer.Long */ -------------------------------------------------------------------------------- /docs/_build/html/_static/sphinx_highlight.js: -------------------------------------------------------------------------------- 1 | /* Highlighting utilities for Sphinx HTML documentation. */ 2 | "use strict"; 3 | 4 | const SPHINX_HIGHLIGHT_ENABLED = true 5 | 6 | /** 7 | * highlight a given string on a node by wrapping it in 8 | * span elements with the given class name. 9 | */ 10 | const _highlight = (node, addItems, text, className) => { 11 | if (node.nodeType === Node.TEXT_NODE) { 12 | const val = node.nodeValue; 13 | const parent = node.parentNode; 14 | const pos = val.toLowerCase().indexOf(text); 15 | if ( 16 | pos >= 0 && 17 | !parent.classList.contains(className) && 18 | !parent.classList.contains("nohighlight") 19 | ) { 20 | let span; 21 | 22 | const closestNode = parent.closest("body, svg, foreignObject"); 23 | const isInSVG = closestNode && closestNode.matches("svg"); 24 | if (isInSVG) { 25 | span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); 26 | } else { 27 | span = document.createElement("span"); 28 | span.classList.add(className); 29 | } 30 | 31 | span.appendChild(document.createTextNode(val.substr(pos, text.length))); 32 | parent.insertBefore( 33 | span, 34 | parent.insertBefore( 35 | document.createTextNode(val.substr(pos + text.length)), 36 | node.nextSibling 37 | ) 38 | ); 39 | node.nodeValue = val.substr(0, pos); 40 | 41 | if (isInSVG) { 42 | const rect = document.createElementNS( 43 | "http://www.w3.org/2000/svg", 44 | "rect" 45 | ); 46 | const bbox = parent.getBBox(); 47 | rect.x.baseVal.value = bbox.x; 48 | rect.y.baseVal.value = bbox.y; 49 | rect.width.baseVal.value = bbox.width; 50 | rect.height.baseVal.value = bbox.height; 51 | rect.setAttribute("class", className); 52 | addItems.push({ parent: parent, target: rect }); 53 | } 54 | } 55 | } else if (node.matches && !node.matches("button, select, textarea")) { 56 | node.childNodes.forEach((el) => _highlight(el, addItems, text, className)); 57 | } 58 | }; 59 | const _highlightText = (thisNode, text, className) => { 60 | let addItems = []; 61 | _highlight(thisNode, addItems, text, className); 62 | addItems.forEach((obj) => 63 | obj.parent.insertAdjacentElement("beforebegin", obj.target) 64 | ); 65 | }; 66 | 67 | /** 68 | * Small JavaScript module for the documentation. 69 | */ 70 | const SphinxHighlight = { 71 | 72 | /** 73 | * highlight the search words provided in localstorage in the text 74 | */ 75 | highlightSearchWords: () => { 76 | if (!SPHINX_HIGHLIGHT_ENABLED) return; // bail if no highlight 77 | 78 | // get and clear terms from localstorage 79 | const url = new URL(window.location); 80 | const highlight = 81 | localStorage.getItem("sphinx_highlight_terms") 82 | || url.searchParams.get("highlight") 83 | || ""; 84 | localStorage.removeItem("sphinx_highlight_terms") 85 | url.searchParams.delete("highlight"); 86 | window.history.replaceState({}, "", url); 87 | 88 | // get individual terms from highlight string 89 | const terms = highlight.toLowerCase().split(/\s+/).filter(x => x); 90 | if (terms.length === 0) return; // nothing to do 91 | 92 | // There should never be more than one element matching "div.body" 93 | const divBody = document.querySelectorAll("div.body"); 94 | const body = divBody.length ? divBody[0] : document.querySelector("body"); 95 | window.setTimeout(() => { 96 | terms.forEach((term) => _highlightText(body, term, "highlighted")); 97 | }, 10); 98 | 99 | const searchBox = document.getElementById("searchbox"); 100 | if (searchBox === null) return; 101 | searchBox.appendChild( 102 | document 103 | .createRange() 104 | .createContextualFragment( 105 | '" 109 | ) 110 | ); 111 | }, 112 | 113 | /** 114 | * helper function to hide the search marks again 115 | */ 116 | hideSearchWords: () => { 117 | document 118 | .querySelectorAll("#searchbox .highlight-link") 119 | .forEach((el) => el.remove()); 120 | document 121 | .querySelectorAll("span.highlighted") 122 | .forEach((el) => el.classList.remove("highlighted")); 123 | localStorage.removeItem("sphinx_highlight_terms") 124 | }, 125 | 126 | initEscapeListener: () => { 127 | // only install a listener if it is really needed 128 | if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) return; 129 | 130 | document.addEventListener("keydown", (event) => { 131 | // bail for input elements 132 | if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; 133 | // bail with special keys 134 | if (event.shiftKey || event.altKey || event.ctrlKey || event.metaKey) return; 135 | if (DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS && (event.key === "Escape")) { 136 | SphinxHighlight.hideSearchWords(); 137 | event.preventDefault(); 138 | } 139 | }); 140 | }, 141 | }; 142 | 143 | _ready(SphinxHighlight.highlightSearchWords); 144 | _ready(SphinxHighlight.initEscapeListener); 145 | -------------------------------------------------------------------------------- /docs/_build/html/genindex.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Index — DeepSlice 1.0.10 documentation 7 | 8 | 9 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 48 | 49 |
53 | 54 |
55 |
56 |
57 |
    58 |
  • 59 | 60 |
  • 61 |
  • 62 |
63 |
64 |
65 |
66 |
67 | 68 | 69 |

Index

70 | 71 |
72 | A 73 | | D 74 | | E 75 | | L 76 | | M 77 | | P 78 | | S 79 | 80 |
81 |

A

82 | 83 | 87 |
88 | 89 |

D

90 | 91 | 100 | 111 |
    92 |
  • 93 | DeepSlice 94 | 95 |
  • 99 |
112 | 113 |

E

114 | 115 | 119 | 123 |
124 | 125 |

L

126 | 127 | 131 |
132 | 133 |

M

134 | 135 | 146 |
147 | 148 |

P

149 | 150 | 154 | 158 |
159 | 160 |

S

161 | 162 | 166 | 170 |
171 | 172 | 173 | 174 |
175 |
176 |
177 | 178 |
179 | 180 |
181 |

© Copyright 2023, Harry Carey.

182 |
183 | 184 | Built with Sphinx using a 185 | theme 186 | provided by Read the Docs. 187 | 188 | 189 |
190 |
191 |
192 |
193 |
194 | 199 | 200 | 201 | -------------------------------------------------------------------------------- /docs/_build/html/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Welcome to DeepSlice’s documentation! — DeepSlice 1.0.10 documentation 8 | 9 | 10 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 53 | 54 |
58 | 59 |
60 |
61 |
62 |
    63 |
  • 64 | 65 |
  • 66 | View page source 67 |
  • 68 |
69 |
70 |
71 |
72 |
73 | 74 |
75 |

Welcome to DeepSlice’s documentation!

76 |
77 |
78 |
79 |
80 |

Indices and tables

81 | 86 |
87 | 88 | 89 |
90 |
91 |
92 | 93 |
94 | 95 |
96 |

© Copyright 2023, Harry Carey.

97 |
98 | 99 | Built with Sphinx using a 100 | theme 101 | provided by Read the Docs. 102 | 103 | 104 |
105 |
106 |
107 |
108 |
109 | 114 | 115 | 116 | -------------------------------------------------------------------------------- /docs/_build/html/modules.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | DeepSlice — DeepSlice 1.0.10 documentation 8 | 9 | 10 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 52 | 53 |
57 | 58 |
59 |
60 |
61 | 68 |
69 |
70 |
71 |
72 | 73 |
74 |

DeepSlice

75 | 96 |
97 | 98 | 99 |
100 |
101 |
102 | 103 |
104 | 105 |
106 |

© Copyright 2023, Harry Carey.

107 |
108 | 109 | Built with Sphinx using a 110 | theme 111 | provided by Read the Docs. 112 | 113 | 114 |
115 |
116 |
117 |
118 |
119 | 124 | 125 | 126 | -------------------------------------------------------------------------------- /docs/_build/html/objects.inv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/docs/_build/html/objects.inv -------------------------------------------------------------------------------- /docs/_build/html/py-modindex.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Python Module Index — DeepSlice 1.0.10 documentation 7 | 8 | 9 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 51 | 52 |
56 | 57 |
58 |
59 |
60 |
    61 |
  • 62 | 63 |
  • 64 |
  • 65 |
66 |
67 |
68 |
69 |
70 | 71 | 72 |

Python Module Index

73 | 74 |
75 | d 76 |
77 | 78 | 79 | 80 | 82 | 83 | 85 | 88 | 89 | 90 | 93 |
 
81 | d
86 | DeepSlice 87 |
    91 | DeepSlice.DSModel 92 |
94 | 95 | 96 |
97 |
98 |
99 | 100 |
101 | 102 |
103 |

© Copyright 2023, Harry Carey.

104 |
105 | 106 | Built with Sphinx using a 107 | theme 108 | provided by Read the Docs. 109 | 110 | 111 |
112 |
113 |
114 |
115 |
116 | 121 | 122 | 123 | -------------------------------------------------------------------------------- /docs/_build/html/search.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Search — DeepSlice 1.0.10 documentation 7 | 8 | 9 | 10 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 51 | 52 |
56 | 57 |
58 |
59 |
60 |
    61 |
  • 62 | 63 |
  • 64 |
  • 65 |
66 |
67 |
68 |
69 |
70 | 71 | 78 | 79 | 80 |
81 | 82 |
83 | 84 |
85 |
86 |
87 | 88 |
89 | 90 |
91 |

© Copyright 2023, Harry Carey.

92 |
93 | 94 | Built with Sphinx using a 95 | theme 96 | provided by Read the Docs. 97 | 98 | 99 |
100 |
101 |
102 |
103 |
104 | 109 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | -------------------------------------------------------------------------------- /docs/_build/html/searchindex.js: -------------------------------------------------------------------------------- 1 | Search.setIndex({"docnames": ["DeepSlice", "index", "modules"], "filenames": ["DeepSlice.rst", "index.rst", "modules.rst"], "titles": ["DeepSlice package", "Welcome to DeepSlice\u2019s documentation!", "DeepSlice"], "terms": {"index": [0, 1], "modul": [1, 2], "search": 1, "page": 1, "class": 0, "model": 0, "thi": 0, "i": 0, "main": [], "us": 0, "tool": [], "predict": [0, 2], "atla": 0, "posit": 0, "mous": 0, "rat": 0, "histolog": 0, "brain": 0, "section": 0, "coord_post_process": [], "plane_alignment_funct": [], "plane_align": [], "angle_method": [], "calculate_angl": [], "calculate_brain_center_coordin": [], "get_mean_angl": [], "propagate_angl": [0, 2], "set_angl": [], "depth_estim": [], "calculate_brain_center_depth": [], "spacing_and_index": [], "calculate_average_section_thick": [], "determine_direction_of_index": [], "enforce_section_ord": [], "ideal_spac": [], "number_sect": [], "set_bad_sections_util": [], "space_according_to_index": [], "trim_mean": [], "metadata": [], "metadata_load": [], "download_fil": [], "get_data_path": [], "load_config": [], "neural_network": [], "network_architectur": [], "get_image_s": [], "gray_scal": [], "initialise_network": [], "load_imag": [], "predictions_util": [], "read_and_writ": [], "quicknii_funct": [], "read_quint_json": [], "read_quicknii_xml": [], "write_quint_json": [], "write_quicknii_xml": [], "dsmodel": [0, 2], "speci": 0, "base": 0, "object": 0, "initialis": 0, "given": 0, "param": 0, "process": 0, "must": 0, "one": 0, "type": 0, "str": 0, "adjust_angl": [0, 2], "ml": 0, "union": 0, "int": 0, "float": 0, "dv": 0, "adjust": 0, "mediolater": 0, "dorsoventr": 0, "angl": 0, "all": 0, "specifi": 0, "valu": 0, "set": 0, "enforce_index_ord": [0, 2], "reorder": 0, "depth": 0, "oi": 0, "thei": 0, "align": 0, "enforce_index_spac": [0, 2], "section_thick": 0, "option": 0, "none": 0, "space": 0, "evenli": 0, "accord": 0, "do": 0, "repres": 0, "precis": 0, "order": 0, "which": 0, "were": 0, "cut": 0, "lead": 0, "less": 0, "accur": 0, "account": 0, "miss": 0, "ie": 0, "3": 0, "1": 0, "2": 0, "4": 0, "thick": 0, "micron": 0, "default": 0, "load_quint": [0, 2], "filenam": 0, "load": 0, "quint": 0, "compat": 0, "json": 0, "xml": 0, "name": 0, "file": 0, "image_directori": 0, "ensembl": 0, "bool": 0, "section_numb": 0, "true": 0, "legacy_section_numb": 0, "fals": 0, "folder": 0, "full": 0, "paramet": 0, "directori": 0, "contain": 0, "whether": 0, "multipl": 0, "when": 0, "avail": 0, "dataset": 0, "includ": 0, "number": 0, "last": 0, "three": 0, "digit": 0, "legaci": 0, "pars": 0, "how": 0, "old": 0, "method": 0, "weighted_mean": 0, "calcul": 0, "averag": 0, "save_predict": [0, 2], "save": 0, "quicknii": 0, "set_bad_sect": [0, 2], "bad_sect": 0, "list": 0, "bad": 0, "run": 0, "after": 0, "A": 0, "ignor": 0, "find_plane_equ": [], "get_angl": [], "get_axi": [], "make_gaussian_weight": [], "rotate_sect": [], "rotation_around_axi": [], "section_adjust": [], "df": [], "seri": [], "The": [], "datafram": [], "panda": [], "return": [], "rtype": [], "atlas_shap": [], "axi": [], "coordin": [], "closest": [], "middl": [], "defin": [], "two": [], "dimens": [], "orthogon": [], "along": [], "being": [], "exampl": [], "coron": [], "midpoint": [], "x": [], "z": [], "ar": [], "y": [], "ccf": [], "center": [], "shape": [], "sagitt": [], "horizont": [], "dv_list": [], "ml_list": [], "propag": [], "mean": [], "subject": [], "an": [], "dv_angl": [], "ml_angl": [], "arrai": [], "consist": [], "oxyz": [], "uxyz": [], "vxyz": [], "np": [], "section_depth": [], "determin": [], "direct": [], "sort": [], "ensur": [], "input": [], "average_thick": [], "ideal": [], "damag": [], "mai": [], "perform": [], "well": [], "label": [], "voxel_s": [], "arr": [], "percent": [], "trim": [], "sourc": [], "from": [], "http": [], "gist": [], "github": [], "com": [], "stuffbyyuki": [], "6f25f9f2f302cb5c1e82e4481016ccd": [], "percentag": [], "plane": [], "find": [], "equat": [], "numpi": [], "ndarrai": [], "normal": [], "vector": [], "constant": [], "k": [], "inp": [], "cross": [], "m": [], "translation_vector": [], "plane_of_sect": [], "amba": [], "3x3": [], "matrix": [], "rotat": [], "3x1": [], "translat": [], "appli": [], "string": [], "around": [], "mini": [], "maxi": [], "gener": [], "weight": [], "gaussian": [], "distribut": [], "minimum": [], "maximum": [], "degre": [], "euler": [], "rodrigu": [], "formula": [], "follow": [], "definit": [], "here": [], "en": [], "wikipedia": [], "org": [], "wiki": [], "e2": [], "80": [], "93rodrigues_formula": [], "length": [], "normalis": [], "requir": [], "radian": [], "url": [], "path": [], "download": [], "url_path_dict": [], "If": [], "data": [], "present": [], "els": [], "dictionari": [], "dict": [], "config": [], "fname": [], "imag": [], "fhandl": [], "its": [], "size": [], "draco": [], "img": [], "convert": [], "grayscal": [], "xception_weight": [], "sequenti": [], "neural": [], "network": [], "kera": [], "image_path": [], "found": [], "preprocess": [], "imagedatagener": [], "image_gener": [], "primary_weight": [], "secondary_weight": [], "pd": [], "target": [], "visualign": [], "nutil": [], "packag": 2, "subpackag": [], "submodul": [], "content": 2}, "objects": {"": [[0, 0, 0, "-", "DeepSlice"]], "DeepSlice": [[0, 1, 1, "", "DSModel"], [1, 0, 0, "-", "DSModel"]], "DeepSlice.DSModel": [[0, 2, 1, "", "adjust_angles"], [0, 2, 1, "", "enforce_index_order"], [0, 2, 1, "", "enforce_index_spacing"], [0, 2, 1, "", "load_QUINT"], [0, 2, 1, "", "predict"], [0, 2, 1, "", "propagate_angles"], [0, 2, 1, "", "save_predictions"], [0, 2, 1, "", "set_bad_sections"]]}, "objtypes": {"0": "py:module", "1": "py:class", "2": "py:method"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "class", "Python class"], "2": ["py", "method", "Python method"]}, "titleterms": {"welcom": 1, "deepslic": [0, 1, 2], "": 1, "document": 1, "indic": 1, "tabl": 1, "packag": 0, "subpackag": [], "submodul": [], "main": [], "modul": 0, "content": 0, "coord_post_process": [], "angle_method": [], "depth_estim": [], "spacing_and_index": [], "plane_alignment_funct": [], "plane_align": [], "metadata": [], "metadata_load": [], "neural_network": [], "network_architectur": [], "read_and_writ": [], "quicknii_funct": []}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 8, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx": 57}, "alltitles": {"Welcome to DeepSlice\u2019s documentation!": [[1, "module-DeepSlice.DSModel"]], "Indices and tables": [[1, "indices-and-tables"]], "DeepSlice": [[2, "deepslice"]], "DeepSlice package": [[0, "deepslice-package"]], "Module contents": [[0, "module-DeepSlice"]]}, "indexentries": {"dsmodel (class in deepslice)": [[0, "DeepSlice.DSModel"]], "deepslice": [[0, "module-DeepSlice"]], "adjust_angles() (deepslice.dsmodel method)": [[0, "DeepSlice.DSModel.adjust_angles"]], "enforce_index_order() (deepslice.dsmodel method)": [[0, "DeepSlice.DSModel.enforce_index_order"]], "enforce_index_spacing() (deepslice.dsmodel method)": [[0, "DeepSlice.DSModel.enforce_index_spacing"]], "load_quint() (deepslice.dsmodel method)": [[0, "DeepSlice.DSModel.load_QUINT"]], "module": [[0, "module-DeepSlice"], [1, "module-DeepSlice.DSModel"]], "predict() (deepslice.dsmodel method)": [[0, "DeepSlice.DSModel.predict"]], "propagate_angles() (deepslice.dsmodel method)": [[0, "DeepSlice.DSModel.propagate_angles"]], "save_predictions() (deepslice.dsmodel method)": [[0, "DeepSlice.DSModel.save_predictions"]], "set_bad_sections() (deepslice.dsmodel method)": [[0, "DeepSlice.DSModel.set_bad_sections"]], "deepslice.dsmodel": [[1, "module-DeepSlice.DSModel"]]}}) -------------------------------------------------------------------------------- /docs/conf.py: -------------------------------------------------------------------------------- 1 | # Configuration file for the Sphinx documentation builder. 2 | # 3 | # For the full list of built-in configuration values, see the documentation: 4 | # https://www.sphinx-doc.org/en/master/usage/configuration.html 5 | 6 | # -- Project information ----------------------------------------------------- 7 | # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information 8 | 9 | project = "DeepSlice" 10 | copyright = "2023, Harry Carey" 11 | author = "Harry Carey, Michael Pegios, Lewis Martin, Maja Puchades, Jan Bjaalie, Simon McMullan" 12 | release = "1.0.10" 13 | 14 | import os 15 | import sys 16 | 17 | sys.path.insert(0, os.path.abspath("..")) 18 | 19 | # -- General configuration --------------------------------------------------- 20 | # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration 21 | 22 | extensions = ["sphinx.ext.autodoc", "sphinx.ext.coverage", "sphinx_rtd_theme"] 23 | templates_path = ["_templates"] 24 | exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] 25 | # include functions from __init__ files 26 | autoclass_content = "both" 27 | # include functions from classes 28 | autodoc_default_options = {"members": True} 29 | 30 | 31 | # -- Options for HTML output ------------------------------------------------- 32 | # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output 33 | 34 | html_theme = "sphinx_rtd_theme" 35 | html_static_path = ["_static"] 36 | -------------------------------------------------------------------------------- /docs/images/DeepSlice_github_banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/docs/images/DeepSlice_github_banner.png -------------------------------------------------------------------------------- /docs/images/process.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/docs/images/process.PNG -------------------------------------------------------------------------------- /docs/index.rst: -------------------------------------------------------------------------------- 1 | .. DeepSlice documentation master file, created by 2 | sphinx-quickstart on Mon Mar 20 15:10:49 2023. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | Welcome to DeepSlice's documentation! 7 | ===================================== 8 | .. automodule:: DeepSlice.DSModel 9 | :members: 10 | .. toctree:: 11 | :maxdepth: 1 12 | :caption: Contents: 13 | 14 | 15 | 16 | Indices and tables 17 | ================== 18 | 19 | * :ref:`genindex` 20 | * :ref:`modindex` 21 | * :ref:`search` 22 | 23 | 24 | -------------------------------------------------------------------------------- /docs/make.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | pushd %~dp0 4 | 5 | REM Command file for Sphinx documentation 6 | 7 | if "%SPHINXBUILD%" == "" ( 8 | set SPHINXBUILD=sphinx-build 9 | ) 10 | set SOURCEDIR=. 11 | set BUILDDIR=_build 12 | 13 | %SPHINXBUILD% >NUL 2>NUL 14 | if errorlevel 9009 ( 15 | echo. 16 | echo.The 'sphinx-build' command was not found. Make sure you have Sphinx 17 | echo.installed, then set the SPHINXBUILD environment variable to point 18 | echo.to the full path of the 'sphinx-build' executable. Alternatively you 19 | echo.may add the Sphinx directory to PATH. 20 | echo. 21 | echo.If you don't have Sphinx installed, grab it from 22 | echo.https://www.sphinx-doc.org/ 23 | exit /b 1 24 | ) 25 | 26 | if "%1" == "" goto help 27 | 28 | %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 29 | goto end 30 | 31 | :help 32 | %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 33 | 34 | :end 35 | popd 36 | -------------------------------------------------------------------------------- /docs/modules.rst: -------------------------------------------------------------------------------- 1 | DeepSlice 2 | ========= 3 | 4 | .. toctree:: 5 | :maxdepth: 0 6 | 7 | DeepSlice 8 | -------------------------------------------------------------------------------- /examples/example_brain/GLTa/641_2002_2567_NM01_s104.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/examples/example_brain/GLTa/641_2002_2567_NM01_s104.png -------------------------------------------------------------------------------- /examples/example_brain/GLTa/641_2002_2568_NM01_s004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/examples/example_brain/GLTa/641_2002_2568_NM01_s004.png -------------------------------------------------------------------------------- /examples/example_brain/GLTa/641_2002_2568_NM01_s014.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/examples/example_brain/GLTa/641_2002_2568_NM01_s014.png -------------------------------------------------------------------------------- /examples/example_brain/GLTa/641_2002_2568_NM01_s024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/examples/example_brain/GLTa/641_2002_2568_NM01_s024.png -------------------------------------------------------------------------------- /examples/example_brain/GLTa/641_2002_2568_NM01_s034.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/examples/example_brain/GLTa/641_2002_2568_NM01_s034.png -------------------------------------------------------------------------------- /examples/example_brain/GLTa/641_2002_2568_NM01_s039.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/examples/example_brain/GLTa/641_2002_2568_NM01_s039.png -------------------------------------------------------------------------------- /examples/example_brain/GLTa/641_2002_2568_NM01_s044.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/examples/example_brain/GLTa/641_2002_2568_NM01_s044.png -------------------------------------------------------------------------------- /examples/example_brain/GLTa/641_2002_2568_NM01_s049.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/examples/example_brain/GLTa/641_2002_2568_NM01_s049.png -------------------------------------------------------------------------------- /examples/example_brain/GLTa/641_2002_2568_NM01_s054.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/examples/example_brain/GLTa/641_2002_2568_NM01_s054.png -------------------------------------------------------------------------------- /examples/example_brain/GLTa/641_2002_2568_NM01_s059.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/examples/example_brain/GLTa/641_2002_2568_NM01_s059.png -------------------------------------------------------------------------------- /examples/example_brain/GLTa/641_2002_2568_NM01_s064.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/examples/example_brain/GLTa/641_2002_2568_NM01_s064.png -------------------------------------------------------------------------------- /examples/example_brain/GLTa/641_2002_2568_NM01_s069.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/examples/example_brain/GLTa/641_2002_2568_NM01_s069.png -------------------------------------------------------------------------------- /examples/example_brain/GLTa/641_2002_2568_NM01_s074.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/examples/example_brain/GLTa/641_2002_2568_NM01_s074.png -------------------------------------------------------------------------------- /examples/example_brain/GLTa/641_2002_2568_NM01_s079.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/examples/example_brain/GLTa/641_2002_2568_NM01_s079.png -------------------------------------------------------------------------------- /examples/example_brain/GLTa/641_2002_2568_NM01_s084.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/examples/example_brain/GLTa/641_2002_2568_NM01_s084.png -------------------------------------------------------------------------------- /examples/example_brain/GLTa/641_2002_2568_NM01_s089.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/examples/example_brain/GLTa/641_2002_2568_NM01_s089.png -------------------------------------------------------------------------------- /examples/example_brain/GLTa/641_2002_2568_NM01_s094.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/examples/example_brain/GLTa/641_2002_2568_NM01_s094.png -------------------------------------------------------------------------------- /examples/example_brain/GLTa/641_2002_2568_NM01_s099.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/examples/example_brain/GLTa/641_2002_2568_NM01_s099.png -------------------------------------------------------------------------------- /examples/example_brain/GLTa/641_2002_2568_NM01_s109.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/examples/example_brain/GLTa/641_2002_2568_NM01_s109.png -------------------------------------------------------------------------------- /examples/example_brain/GLTa/641_2002_2568_NM01_s114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/examples/example_brain/GLTa/641_2002_2568_NM01_s114.png -------------------------------------------------------------------------------- /examples/example_brain/GLTa/641_2002_2568_NM01_s119.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/examples/example_brain/GLTa/641_2002_2568_NM01_s119.png -------------------------------------------------------------------------------- /examples/example_brain/GLTa/641_2002_2568_NM01_s124.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/examples/example_brain/GLTa/641_2002_2568_NM01_s124.png -------------------------------------------------------------------------------- /examples/example_brain/GLTa/641_2002_2568_NM01_s129.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/examples/example_brain/GLTa/641_2002_2568_NM01_s129.png -------------------------------------------------------------------------------- /examples/example_brain/GLTa/641_2002_2568_NM01_s134.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/examples/example_brain/GLTa/641_2002_2568_NM01_s134.png -------------------------------------------------------------------------------- /examples/example_brain/GLTa/641_2002_2568_NM01_s139.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/examples/example_brain/GLTa/641_2002_2568_NM01_s139.png -------------------------------------------------------------------------------- /examples/example_brain/GLTa/641_2002_2568_NM01_s144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/examples/example_brain/GLTa/641_2002_2568_NM01_s144.png -------------------------------------------------------------------------------- /examples/example_brain/GLTa/641_2002_2568_NM01_s154.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/examples/example_brain/GLTa/641_2002_2568_NM01_s154.png -------------------------------------------------------------------------------- /examples/example_brain/GLTa/641_2002_2568_NM01_s159.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/examples/example_brain/GLTa/641_2002_2568_NM01_s159.png -------------------------------------------------------------------------------- /examples/example_brain/GLTa/641_2002_2568_NM01_s164.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/examples/example_brain/GLTa/641_2002_2568_NM01_s164.png -------------------------------------------------------------------------------- /examples/example_brain/GLTa/641_2002_2568_NM01_s169.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/examples/example_brain/GLTa/641_2002_2568_NM01_s169.png -------------------------------------------------------------------------------- /examples/example_brain/GLTa/641_2002_2568_NM01_s174.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/examples/example_brain/GLTa/641_2002_2568_NM01_s174.png -------------------------------------------------------------------------------- /examples/example_brain/GLTa/641_2002_2568_NM01_s179.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/examples/example_brain/GLTa/641_2002_2568_NM01_s179.png -------------------------------------------------------------------------------- /examples/example_brain/GLTa/641_2002_2568_NM01_s184.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/examples/example_brain/GLTa/641_2002_2568_NM01_s184.png -------------------------------------------------------------------------------- /examples/example_brain/GLTa/641_2002_2568_NM01_s189.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/examples/example_brain/GLTa/641_2002_2568_NM01_s189.png -------------------------------------------------------------------------------- /examples/example_brain/GLTa/641_2002_2568_NM01_s199.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PolarBean/DeepSlice/8586b8338f4b80ad447dba40db3af8e1fa5f2c21/examples/example_brain/GLTa/641_2002_2568_NM01_s199.png -------------------------------------------------------------------------------- /examples/example_brain/GLTa/GLTa.csv: -------------------------------------------------------------------------------- 1 | Filenames,ox,oy,oz,ux,uy,uz,vx,vy,vz,width,height,nr,depths 2 | 641_2002_2568_NM01_s004.png,488.54515910267946,427.333381821139,335.63186198269665,-513.4249170702626,0.8106067869831008,-14.495758560082152,6.734330282038968,1.3105183759336683,-388.7668921868082,1024,670,4,422.9118750629937 3 | 641_2002_2568_NM01_s014.png,480.50913810922094,407.418685672972,343.44071703241025,-518.3852922811277,0.7629257292070406,1.707536424790021,-4.417024444185529,1.3527948145082291,-396.34489903071824,1024,670,14,406.4085507876553 4 | 641_2002_2568_NM01_s024.png,475.1574679997277,387.586282328276,325.8499867071652,-509.0012939030716,0.7561501858507427,-0.39459599824948555,-2.0245356585602963,1.3297070894504373,-390.5922159734039,1024,670,24,387.55003631876156 5 | 641_2002_2568_NM01_s034.png,472.5403921179168,367.67543340377904,330.160364309089,-483.8684251305115,0.7156131352302282,0.5672146911481377,-4.444759413642373,1.3008941181303157,-381.0528229272334,1024,670,34,375.37066436090765 6 | 641_2002_2568_NM01_s039.png,485.4616627702552,357.7069790979335,329.93913113846315,-506.11004452325363,0.7221936546186498,8.34019696770656,-9.903977381491245,1.3475670470431282,-392.4102873313166,1024,670,39,358.11853771009174 7 | 641_2002_2568_NM01_s044.png,472.9527075285033,347.77398687762974,330.3800180657967,-486.79415998388464,0.6724270505285403,14.558863042032726,-17.938363887752075,1.2987443287607903,-374.5288142298647,1024,670,44,348.83154152178594 8 | 641_2002_2568_NM01_s049.png,480.16640633491295,337.8107958978836,331.10105633765323,-487.48295135216216,0.6852701530406193,11.07846920610774,-12.72556455774054,1.314827122191332,-381.539538945357,1024,670,49,340.39656046132524 9 | 641_2002_2568_NM01_s054.png,470.0154884034932,327.91926873048067,318.3048278998639,-490.23993575659125,0.7216847617428925,1.561381260258031,-5.3098806377196865,1.2854525447954188,-376.12900533434026,1024,670,54,332.16590554395094 10 | 641_2002_2568_NM01_s059.png,478.97284955043517,317.9647864019653,315.70071631259805,-505.150626337767,0.7686875857717723,-5.766844194083717,3.176860341318502,1.285299338034747,-379.7890766834723,1024,670,59,328.8235259378494 11 | 641_2002_2568_NM01_s064.png,484.6871730430862,307.9294930396431,338.30385962490715,-489.1656845505831,0.6859100633848243,11.624729388000787,-12.137317822566843,1.2970643302662097,-376.5668544663952,1024,670,64,315.81218205939274 12 | 641_2002_2568_NM01_s069.png,472.1099610906332,297.96420500793647,348.2826840646768,-491.5049935268545,0.714468051242136,4.2383410585908905,-7.1256099292871795,1.3219039350988737,-386.0678591773606,1024,670,69,306.0030503709116 13 | 641_2002_2568_NM01_s074.png,478.6660965670668,288.0866617858854,324.0754388935418,-489.7152217130443,0.7031726636653275,6.782404944263703,-6.888921066310104,1.2693340510931534,-370.69421162461543,1024,670,74,289.9941529065286 14 | 641_2002_2568_NM01_s079.png,481.79035762264823,278.11900403284164,327.8969135988633,-508.8816187883068,0.730376846959075,7.141027039103221,-6.8142752291511215,1.3387703225764653,-391.1693784859452,1024,670,79,281.81604680954723 15 | 641_2002_2568_NM01_s084.png,486.50531986118494,268.1675226701067,326.2614584556847,-515.7976233227356,0.7051786642360867,17.57898565437398,-15.287293925227004,1.3371246707686169,-386.9857002274168,1024,670,84,266.3673155492696 16 | 641_2002_2568_NM01_s089.png,482.47295465219713,258.1951002469657,334.6101586014391,-501.9365478494276,0.7180557531049772,7.7363449213978015,-9.457549461096619,1.3192394320446112,-384.2653209933701,1024,670,89,251.19701943408577 17 | 641_2002_2568_NM01_s094.png,483.28488595286063,248.24537597826753,334.16140277196826,-504.6859073088321,0.7209838466027918,8.07461814352007,-8.779400256520887,1.2711201907511054,-370.3947118063026,1024,670,94,241.2851818799997 18 | 641_2002_2568_NM01_s099.png,477.16761518992126,238.24529505108788,351.5632182756736,-508.6036274954276,0.824167540216024,-20.59304819921175,14.618361920352754,1.2989288662914191,-388.7968944043848,1024,670,99,230.74977106714402 19 | 641_2002_2567_NM01_s104.png,473.91480396912175,228.35836305118195,334.40253260435196,-494.334073577008,0.6753441989698103,16.991838500322217,-13.986589152204715,1.2796863676438193,-370.643284775747,1024,670,104,225.06374601374682 20 | 641_2002_2568_NM01_s109.png,481.96885937420217,218.3762864751472,340.31675074531074,-514.7372525842181,0.7201721194758477,12.701854878731012,-13.73948365254887,1.3421198850478504,-389.1320795841408,1024,670,109,216.70113215175255 21 | 641_2002_2568_NM01_s114.png,489.53734103648867,208.43925932811064,333.1800609086698,-512.4087243780175,0.7068913435276443,15.595220007363991,-15.185472007001067,1.3423194535370442,-388.5595386047518,1024,670,114,211.7479093998025 22 | 641_2002_2568_NM01_s119.png,481.84967357682257,198.48475459780792,337.8495000374711,-517.4137786307531,0.7075551144912424,17.58492798987436,-16.43527890648477,1.35244879972916,-390.9960508392972,1024,670,119,200.2166623921658 23 | 641_2002_2568_NM01_s124.png,479.2854052439948,188.54825595874135,334.98101115071336,-496.5583671077145,0.6474783746043897,26.166845062078835,-23.670435216116744,1.3031727962190587,-373.33005795727877,1024,670,124,193.41421718285676 24 | 641_2002_2568_NM01_s129.png,488.16910699876485,178.566320085543,340.4915949230083,-512.2344701782245,0.7456964777429675,4.094610501205182,-5.658516838039247,1.3268047270878185,-388.1511999682694,1024,670,129,180.76915856957854 25 | 641_2002_2568_NM01_s134.png,483.5305377831322,168.6550632147603,331.0973404131218,-512.1878764787098,0.7133319472409596,13.60263755288804,-12.703689546979717,1.3115516569187946,-380.5847669909069,1024,670,134,173.28972462716803 26 | 641_2002_2568_NM01_s139.png,481.7268740109012,158.66465130418294,343.7692696257968,-512.4126168130085,0.776741902865183,-4.967627855125443,2.5217119540375847,1.2382868330245458,-365.66220242819696,1024,670,139,158.5688614238017 27 | 641_2002_2568_NM01_s144.png,491.264336846227,148.6779047367498,350.4107374595892,-513.6614831795632,0.7503359751334244,3.3517176282380206,-3.977260212509009,1.2930901383808475,-378.95937317585356,1024,670,144,156.54932649852432 28 | 641_2002_2568_NM01_s154.png,480.7459952248066,128.78590558543556,352.6211622037676,-528.9258187437147,0.7561022039938052,8.318261951264958,-10.134470790299702,1.4171371655815221,-412.7916408532506,1024,670,154,121.09987836701531 29 | 641_2002_2568_NM01_s159.png,497.9003272237866,118.8208635004086,349.5472576148481,-544.6524517281448,0.7569246281461943,14.942132275985955,-15.888186100933922,1.382043721511593,-399.94787758962576,1024,670,159,126.76191747339436 30 | 641_2002_2568_NM01_s164.png,483.183505267663,108.92949386985595,338.69805035946126,-532.1323141123933,0.7891298223242984,-0.005420491929726268,-3.823274167786394,1.3463590036140403,-394.7093687767418,1024,670,164,106.22948186502414 31 | 641_2002_2568_NM01_s169.png,478.17310726456554,99.000024968451,334.82789348226146,-506.86283950143087,0.7315957296291629,5.900811510709275,-9.599996186314968,1.3326970279687629,-388.1651515110056,1024,670,169,92.26926853579722 32 | 641_2002_2568_NM01_s174.png,469.676920828799,89.04151341561197,341.02995905736304,-502.2325088616485,0.7329602747908552,3.4775498295724674,-5.7460904446516,1.32468295976021,-387.4883019834167,1024,670,174,89.27131802741712 33 | 641_2002_2568_NM01_s179.png,477.62373664575193,79.09534071239042,336.42061785168465,-514.6561499424356,0.7388113117674493,7.178923922303454,-8.892017038223685,1.3298153794191023,-387.6258659426961,1024,670,179,83.21165375663074 34 | 641_2002_2568_NM01_s184.png,478.9584038966408,69.13577743703284,338.64032349323804,-515.1790413807032,0.7392063331884913,7.290912603300285,-10.359007252054028,1.3412744594129293,-390.35904286865286,1024,670,184,70.55794801508549 35 | 641_2002_2568_NM01_s189.png,478.6161350207269,59.18605033245428,338.69630776747965,-507.5511031879082,0.7605356159637182,-2.3188309194447356,-2.337113245630235,1.3256316690647267,-389.25591492988707,1024,670,189,59.0256125879482 36 | 641_2002_2568_NM01_s199.png,478.805892056693,39.29029991345543,337.3361488457322,-516.6671477965315,0.7633031148045788,0.8463165457484934,-6.309918065866043,1.345620006000047,-393.4061728893756,1024,670,199,48.36161557515491 37 | -------------------------------------------------------------------------------- /examples/example_brain/GLTa/GLTa.json: -------------------------------------------------------------------------------- 1 | {"name": "", "target": "ABA_Mouse_CCFv3_2017_25um.cutlas", "aligner": "prerelease_1.0.0", "slices": [{"filename": "641_2002_2568_NM01_s004.png", "anchoring": [488.54515910267946, 427.333381821139, 335.63186198269665, -513.4249170702626, 0.8106067869831008, -14.495758560082152, 6.734330282038968, 1.3105183759336683, -388.7668921868082], "height": 670, "width": 1024, "nr": 4, "markers": []}, {"filename": "641_2002_2568_NM01_s014.png", "anchoring": [480.50913810922094, 407.418685672972, 343.44071703241025, -518.3852922811277, 0.7629257292070406, 1.707536424790021, -4.417024444185529, 1.3527948145082291, -396.34489903071824], "height": 670, "width": 1024, "nr": 14, "markers": []}, {"filename": "641_2002_2568_NM01_s024.png", "anchoring": [475.1574679997277, 387.586282328276, 325.8499867071652, -509.0012939030716, 0.7561501858507427, -0.39459599824948555, -2.0245356585602963, 1.3297070894504373, -390.5922159734039], "height": 670, "width": 1024, "nr": 24, "markers": []}, {"filename": "641_2002_2568_NM01_s034.png", "anchoring": [472.5403921179168, 367.67543340377904, 330.160364309089, -483.8684251305115, 0.7156131352302282, 0.5672146911481377, -4.444759413642373, 1.3008941181303157, -381.0528229272334], "height": 670, "width": 1024, "nr": 34, "markers": []}, {"filename": "641_2002_2568_NM01_s039.png", "anchoring": [485.4616627702552, 357.7069790979335, 329.93913113846315, -506.11004452325363, 0.7221936546186498, 8.34019696770656, -9.903977381491245, 1.3475670470431282, -392.4102873313166], "height": 670, "width": 1024, "nr": 39, "markers": []}, {"filename": "641_2002_2568_NM01_s044.png", "anchoring": [472.9527075285033, 347.77398687762974, 330.3800180657967, -486.79415998388464, 0.6724270505285403, 14.558863042032726, -17.938363887752075, 1.2987443287607903, -374.5288142298647], "height": 670, "width": 1024, "nr": 44, "markers": []}, {"filename": "641_2002_2568_NM01_s049.png", "anchoring": [480.16640633491295, 337.8107958978836, 331.10105633765323, -487.48295135216216, 0.6852701530406193, 11.07846920610774, -12.72556455774054, 1.314827122191332, -381.539538945357], "height": 670, "width": 1024, "nr": 49, "markers": []}, {"filename": "641_2002_2568_NM01_s054.png", "anchoring": [470.0154884034932, 327.91926873048067, 318.3048278998639, -490.23993575659125, 0.7216847617428925, 1.561381260258031, -5.3098806377196865, 1.2854525447954188, -376.12900533434026], "height": 670, "width": 1024, "nr": 54, "markers": []}, {"filename": "641_2002_2568_NM01_s059.png", "anchoring": [478.97284955043517, 317.9647864019653, 315.70071631259805, -505.150626337767, 0.7686875857717723, -5.766844194083717, 3.176860341318502, 1.285299338034747, -379.7890766834723], "height": 670, "width": 1024, "nr": 59, "markers": []}, {"filename": "641_2002_2568_NM01_s064.png", "anchoring": [484.6871730430862, 307.9294930396431, 338.30385962490715, -489.1656845505831, 0.6859100633848243, 11.624729388000787, -12.137317822566843, 1.2970643302662097, -376.5668544663952], "height": 670, "width": 1024, "nr": 64, "markers": []}, {"filename": "641_2002_2568_NM01_s069.png", "anchoring": [472.1099610906332, 297.96420500793647, 348.2826840646768, -491.5049935268545, 0.714468051242136, 4.2383410585908905, -7.1256099292871795, 1.3219039350988737, -386.0678591773606], "height": 670, "width": 1024, "nr": 69, "markers": []}, {"filename": "641_2002_2568_NM01_s074.png", "anchoring": [478.6660965670668, 288.0866617858854, 324.0754388935418, -489.7152217130443, 0.7031726636653275, 6.782404944263703, -6.888921066310104, 1.2693340510931534, -370.69421162461543], "height": 670, "width": 1024, "nr": 74, "markers": []}, {"filename": "641_2002_2568_NM01_s079.png", "anchoring": [481.79035762264823, 278.11900403284164, 327.8969135988633, -508.8816187883068, 0.730376846959075, 7.141027039103221, -6.8142752291511215, 1.3387703225764653, -391.1693784859452], "height": 670, "width": 1024, "nr": 79, "markers": []}, {"filename": "641_2002_2568_NM01_s084.png", "anchoring": [486.50531986118494, 268.1675226701067, 326.2614584556847, -515.7976233227356, 0.7051786642360867, 17.57898565437398, -15.287293925227004, 1.3371246707686169, -386.9857002274168], "height": 670, "width": 1024, "nr": 84, "markers": []}, {"filename": "641_2002_2568_NM01_s089.png", "anchoring": [482.47295465219713, 258.1951002469657, 334.6101586014391, -501.9365478494276, 0.7180557531049772, 7.7363449213978015, -9.457549461096619, 1.3192394320446112, -384.2653209933701], "height": 670, "width": 1024, "nr": 89, "markers": []}, {"filename": "641_2002_2568_NM01_s094.png", "anchoring": [483.28488595286063, 248.24537597826753, 334.16140277196826, -504.6859073088321, 0.7209838466027918, 8.07461814352007, -8.779400256520887, 1.2711201907511054, -370.3947118063026], "height": 670, "width": 1024, "nr": 94, "markers": []}, {"filename": "641_2002_2568_NM01_s099.png", "anchoring": [477.16761518992126, 238.24529505108788, 351.5632182756736, -508.6036274954276, 0.824167540216024, -20.59304819921175, 14.618361920352754, 1.2989288662914191, -388.7968944043848], "height": 670, "width": 1024, "nr": 99, "markers": []}, {"filename": "641_2002_2567_NM01_s104.png", "anchoring": [473.91480396912175, 228.35836305118195, 334.40253260435196, -494.334073577008, 0.6753441989698103, 16.991838500322217, -13.986589152204715, 1.2796863676438193, -370.643284775747], "height": 670, "width": 1024, "nr": 104, "markers": []}, {"filename": "641_2002_2568_NM01_s109.png", "anchoring": [481.96885937420217, 218.3762864751472, 340.31675074531074, -514.7372525842181, 0.7201721194758477, 12.701854878731012, -13.73948365254887, 1.3421198850478504, -389.1320795841408], "height": 670, "width": 1024, "nr": 109, "markers": []}, {"filename": "641_2002_2568_NM01_s114.png", "anchoring": [489.53734103648867, 208.43925932811064, 333.1800609086698, -512.4087243780175, 0.7068913435276443, 15.595220007363991, -15.185472007001067, 1.3423194535370442, -388.5595386047518], "height": 670, "width": 1024, "nr": 114, "markers": []}, {"filename": "641_2002_2568_NM01_s119.png", "anchoring": [481.84967357682257, 198.48475459780792, 337.8495000374711, -517.4137786307531, 0.7075551144912424, 17.58492798987436, -16.43527890648477, 1.35244879972916, -390.9960508392972], "height": 670, "width": 1024, "nr": 119, "markers": []}, {"filename": "641_2002_2568_NM01_s124.png", "anchoring": [479.2854052439948, 188.54825595874135, 334.98101115071336, -496.5583671077145, 0.6474783746043897, 26.166845062078835, -23.670435216116744, 1.3031727962190587, -373.33005795727877], "height": 670, "width": 1024, "nr": 124, "markers": []}, {"filename": "641_2002_2568_NM01_s129.png", "anchoring": [488.16910699876485, 178.566320085543, 340.4915949230083, -512.2344701782245, 0.7456964777429675, 4.094610501205182, -5.658516838039247, 1.3268047270878185, -388.1511999682694], "height": 670, "width": 1024, "nr": 129, "markers": []}, {"filename": "641_2002_2568_NM01_s134.png", "anchoring": [483.5305377831322, 168.6550632147603, 331.0973404131218, -512.1878764787098, 0.7133319472409596, 13.60263755288804, -12.703689546979717, 1.3115516569187946, -380.5847669909069], "height": 670, "width": 1024, "nr": 134, "markers": []}, {"filename": "641_2002_2568_NM01_s139.png", "anchoring": [481.7268740109012, 158.66465130418294, 343.7692696257968, -512.4126168130085, 0.776741902865183, -4.967627855125443, 2.5217119540375847, 1.2382868330245458, -365.66220242819696], "height": 670, "width": 1024, "nr": 139, "markers": []}, {"filename": "641_2002_2568_NM01_s144.png", "anchoring": [491.264336846227, 148.6779047367498, 350.4107374595892, -513.6614831795632, 0.7503359751334244, 3.3517176282380206, -3.977260212509009, 1.2930901383808475, -378.95937317585356], "height": 670, "width": 1024, "nr": 144, "markers": []}, {"filename": "641_2002_2568_NM01_s154.png", "anchoring": [480.7459952248066, 128.78590558543556, 352.6211622037676, -528.9258187437147, 0.7561022039938052, 8.318261951264958, -10.134470790299702, 1.4171371655815221, -412.7916408532506], "height": 670, "width": 1024, "nr": 154, "markers": []}, {"filename": "641_2002_2568_NM01_s159.png", "anchoring": [497.9003272237866, 118.8208635004086, 349.5472576148481, -544.6524517281448, 0.7569246281461943, 14.942132275985955, -15.888186100933922, 1.382043721511593, -399.94787758962576], "height": 670, "width": 1024, "nr": 159, "markers": []}, {"filename": "641_2002_2568_NM01_s164.png", "anchoring": [483.183505267663, 108.92949386985595, 338.69805035946126, -532.1323141123933, 0.7891298223242984, -0.005420491929726268, -3.823274167786394, 1.3463590036140403, -394.7093687767418], "height": 670, "width": 1024, "nr": 164, "markers": []}, {"filename": "641_2002_2568_NM01_s169.png", "anchoring": [478.17310726456554, 99.000024968451, 334.82789348226146, -506.86283950143087, 0.7315957296291629, 5.900811510709275, -9.599996186314968, 1.3326970279687629, -388.1651515110056], "height": 670, "width": 1024, "nr": 169, "markers": []}, {"filename": "641_2002_2568_NM01_s174.png", "anchoring": [469.676920828799, 89.04151341561197, 341.02995905736304, -502.2325088616485, 0.7329602747908552, 3.4775498295724674, -5.7460904446516, 1.32468295976021, -387.4883019834167], "height": 670, "width": 1024, "nr": 174, "markers": []}, {"filename": "641_2002_2568_NM01_s179.png", "anchoring": [477.62373664575193, 79.09534071239042, 336.42061785168465, -514.6561499424356, 0.7388113117674493, 7.178923922303454, -8.892017038223685, 1.3298153794191023, -387.6258659426961], "height": 670, "width": 1024, "nr": 179, "markers": []}, {"filename": "641_2002_2568_NM01_s184.png", "anchoring": [478.9584038966408, 69.13577743703284, 338.64032349323804, -515.1790413807032, 0.7392063331884913, 7.290912603300285, -10.359007252054028, 1.3412744594129293, -390.35904286865286], "height": 670, "width": 1024, "nr": 184, "markers": []}, {"filename": "641_2002_2568_NM01_s189.png", "anchoring": [478.6161350207269, 59.18605033245428, 338.69630776747965, -507.5511031879082, 0.7605356159637182, -2.3188309194447356, -2.337113245630235, 1.3256316690647267, -389.25591492988707], "height": 670, "width": 1024, "nr": 189, "markers": []}, {"filename": "641_2002_2568_NM01_s199.png", "anchoring": [478.805892056693, 39.29029991345543, 337.3361488457322, -516.6671477965315, 0.7633031148045788, 0.8463165457484934, -6.309918065866043, 1.345620006000047, -393.4061728893756], "height": 670, "width": 1024, "nr": 199, "markers": []}]} -------------------------------------------------------------------------------- /examples/example_brain/GLTa/GLTa.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /examples/example_brain/GLTa/MyResults.csv: -------------------------------------------------------------------------------- 1 | Filenames,ox,oy,oz,ux,uy,uz,vx,vy,vz,width,height,nr,bad_section,depths 2 | 641_2002_2568_NM01_s004.png,494.7032167330206,454.05052059976964,335.4601872401916,-518.2232672278502,-3.9260480814508014,-18.227798373058192,9.16194228338685,-7.821693715967115,-375.72201204229935,1024,670,4,False,441.2102226145454 3 | 641_2002_2568_NM01_s014.png,484.28944520295465,431.8224107812892,343.35347135648357,-518.3690235883199,-3.6954675254972926,-7.19215408551122,5.981852352340411,-7.941561803910361,-380.3979885113568,1024,670,14,False,418.78488195847854 4 | 641_2002_2568_NM01_s024.png,474.6415595291062,409.0079466659288,323.05494233282883,-505.2442364747077,-3.56067208313857,-5.0453101962999085,4.694938767096801,-7.801789301631459,-373.31791371291615,1024,670,24,False,402.959481178513 5 | 641_2002_2568_NM01_s034.png,472.16696439432405,386.78228028500996,328.47766702862134,-475.4099501825167,-3.351707296763948,-4.808891108272576,0.9972321249586003,-7.818466209235794,-372.9077066942683,1024,670,34,False,388.6455944369738 6 | 641_2002_2568_NM01_s039.png,488.4767586809239,375.6823112198405,326.08427552974416,-495.0874699975744,-3.15951817791489,10.761721197043073,-13.139931984029317,-8.28072895472934,-390.3298265885487,1024,670,39,False,374.4379264593089 7 | 641_2002_2568_NM01_s044.png,480.02773518728304,364.47919683571723,326.84333254811446,-485.275211869539,-2.9372158922565745,18.157985103177396,-21.186256571373406,-7.928553879088213,-370.9252801465889,1024,670,44,False,356.0534494729951 8 | 641_2002_2568_NM01_s049.png,486.6267436753162,353.409818930658,329.07203066504314,-484.3703912586601,-2.9720723196895733,16.20209468216831,-17.81061339348446,-8.22069156760358,-385.9468334691206,1024,670,49,False,349.7942984169691 9 | 641_2002_2568_NM01_s054.png,470.09975806217085,341.8562249517062,315.7614929260963,-481.1006472964035,-3.262579769229717,1.2927275042317774,-5.241985664748995,-7.812365570284044,-370.58391598124484,1024,670,54,False,338.2676314749016 10 | 641_2002_2568_NM01_s059.png,479.86641378118173,330.7360048152255,314.53517302699186,-500.48418918745347,-3.6285342829395972,-9.830380088318748,8.46854729115529,-7.914955397960227,-379.94037215765275,1024,670,59,False,337.23501546302634 11 | 641_2002_2568_NM01_s064.png,492.6358441410294,320.1507161128536,337.8221029014745,-491.4481689354413,-3.068966946666535,13.890937381861647,-10.397494664402188,-8.01384113553064,-378.50512822085994,1024,670,64,False,321.30636104205473 12 | 641_2002_2568_NM01_s069.png,476.73102341692606,309.1761574469605,351.90227673919765,-486.59352210252973,-3.2572637361274133,3.335930620705142,-4.5746637472482234,-8.189937397159952,-388.79424848553276,1024,670,69,False,300.88588262343285 13 | 641_2002_2568_NM01_s074.png,484.1573871231968,297.54013259110616,326.85827986479643,-484.70014206771555,-3.24657694987161,3.228223053068916,-2.930418153544224,-7.914219408308668,-376.19091152111963,1024,670,74,False,287.57521275014216 14 | 641_2002_2568_NM01_s079.png,485.96203761792447,286.4791115343116,331.04746848696294,-503.3114626229808,-3.3783252334765166,3.0144469708824886,0.4846675304806354,-8.200618585272878,-390.95185387325466,1024,670,79,False,277.9142222302207 15 | 641_2002_2568_NM01_s084.png,494.26360175676894,275.3132147273358,328.1218495316282,-514.035303665146,-3.204759709448581,14.779979746588879,-10.365021249107826,-8.081942124021168,-381.7610082797088,1024,670,84,False,264.95954959101243 16 | 641_2002_2568_NM01_s089.png,491.66493281591556,264.2328626894313,332.82468801941155,-493.23656594212036,-3.2347719183102015,6.572419705696177,-7.685124460966335,-8.031518547840392,-380.2313692570373,1024,670,89,False,253.67884076252008 17 | 641_2002_2568_NM01_s094.png,488.85258141739376,253.03268938335628,331.8871610062102,-494.04263092651547,-3.219660671648086,7.555197342144709,-3.6012198213345528,-7.7085128689618045,-366.16954700275375,1024,670,94,True,240.86580266574725 18 | 641_2002_2568_NM01_s099.png,482.42293416718985,242.28803606205602,353.8358009800558,-496.8959589179719,-4.03414480312253,-30.32865616776911,21.680704920095764,-7.974511113160759,-387.0836843374803,1024,670,99,False,228.98284462321624 19 | 641_2002_2567_NM01_s104.png,473.39661660449025,230.66544709681455,334.7932164882177,-486.40199445040605,-2.9937042372356757,15.833253459377943,-5.601899156638467,-7.8234734355806665,-370.9959707587368,1024,670,104,False,223.30816433004304 20 | 641_2002_2568_NM01_s109.png,487.34183536244893,219.66327991307688,337.83099874354235,-510.89161280014144,-3.2099517050361612,13.508188456487062,-12.002703590488522,-8.13124404748217,-383.5768093524527,1024,670,109,False,213.34008565279342 21 | 641_2002_2568_NM01_s114.png,495.3129249094335,208.48599136797057,334.4702056297183,-505.5843096317978,-3.106727191272597,16.697865449820597,-11.693756370994151,-8.179664360450573,-385.98491085186294,1024,670,114,False,206.92953301321174 22 | 641_2002_2568_NM01_s119.png,483.0040793553484,197.35785227793377,340.05987828221953,-512.3120936086566,-3.1606890253025597,16.318634218595776,-11.893066887369855,-8.167380830661358,-385.3346026794329,1024,670,119,False,193.2604509282501 23 | 641_2002_2568_NM01_s124.png,480.29637824674273,186.01092342215708,332.0947506509051,-484.67372037014684,-2.705187690584694,29.019093467227208,-18.92577134358544,-7.726945052628025,-362.0543591196711,1024,670,124,False,184.69514544576433 24 | 641_2002_2568_NM01_s129.png,492.27775469504127,175.1532306887408,342.6572715655717,-507.82258598249865,-3.4457083271149713,1.2733211807731095,-1.3604711923911168,-8.088951178684198,-385.02918732881733,1024,670,129,False,169.27427795563312 25 | 641_2002_2568_NM01_s134.png,485.64153643523036,163.70800353921777,331.2879134165818,-504.67743770961783,-3.171870357249645,13.298014106357357,-11.371542650173524,-8.028839230439445,-378.90246100138353,1024,670,134,False,165.11513508669265 26 | 641_2002_2568_NM01_s139.png,484.948964622556,152.8021154912605,343.6835944773486,-513.3118572156216,-3.639138316171028,-6.155744266614022,5.578823944669807,-7.558336613071361,-362.00436822996284,1024,670,139,False,143.48434580511451 27 | 641_2002_2568_NM01_s144.png,496.59684485241974,141.95479845895642,354.84922917425564,-516.4648617567099,-3.555024126829437,-1.1199198788282843,3.875669584556306,-7.917680676510656,-378.57364364399496,1024,670,144,False,133.56497458610806 28 | 641_2002_2568_NM01_s154.png,491.9685425169928,119.52379623474411,351.1886561129903,-536.1868448270509,-3.3609434300914103,14.55527222987621,-9.448340004175748,-8.905367303316083,-421.2993919729981,1024,670,154,False,116.35099504365856 29 | 641_2002_2568_NM01_s159.png,498.51228764589314,108.41983183153157,351.7871485940841,-542.7456490552836,-3.376312780990304,15.960108713454815,-13.201554896502444,-8.51426953309526,-401.4389339858796,1024,670,159,False,109.0056627679522 30 | 641_2002_2568_NM01_s164.png,477.89497799995445,96.93356217990684,343.01773557104485,-519.1501720267376,-3.660569537101807,-5.274579442185143,5.732858502223962,-8.228645293720732,-393.9975866053594,1024,670,164,False,97.9787624547193 31 | 641_2002_2568_NM01_s169.png,478.34808772948514,85.63637123512231,336.39286129322875,-503.14227663325534,-3.329893799493348,5.26725625176357,-5.556623700263856,-8.191273445455494,-388.53794257174894,1024,670,169,False,85.8839052159774 32 | 641_2002_2568_NM01_s174.png,467.2885711292482,74.61180044139991,346.5108888503453,-489.04010148424567,-3.382960553751488,-1.8568156328477698,2.5971142928572704,-8.084975608689177,-386.12932817536694,1024,670,174,False,78.11054766833418 33 | 641_2002_2568_NM01_s179.png,480.28761166054875,63.368350159824175,338.35885236117144,-503.67416114673983,-3.2740882281490826,8.09993069287168,-7.760941479995097,-8.053060330251824,-381.23321730993075,1024,670,179,False,75.97040074311424 34 | 641_2002_2568_NM01_s184.png,477.9725079841031,52.19785431207989,338.6735424801194,-497.53423775059883,-3.270366387144314,6.276601316680228,-7.6444828247233545,-7.999687943890905,-378.72775131617067,1024,670,184,False,60.77521351461299 35 | 641_2002_2568_NM01_s189.png,478.1323847295527,41.111988078216996,342.2147080438157,-490.43929240303476,-3.4301333863417582,-3.6488617309539677,-0.10442537570253307,-8.27814263827306,-394.4542395204915,1024,670,189,False,46.48458182531876 36 | 641_2002_2568_NM01_s199.png,472.3414766160381,18.650141704138807,337.46311012467544,-497.6998381418747,-3.5762882914584573,-8.247910858113585,2.8537777980108103,-8.178300989381412,-390.6603089010761,1024,670,199,True,24.35408029151025 37 | -------------------------------------------------------------------------------- /examples/example_brain/GLTa/MyResults.json: -------------------------------------------------------------------------------- 1 | {"name": "", "target": "ABA_Mouse_CCFv3_2017_25um.cutlas", "aligner": "prerelease_1.0.0", "slices": [{"filename": "641_2002_2568_NM01_s004.png", "anchoring": [494.7032167330206, 454.05052059976964, 335.4601872401916, -518.2232672278502, -3.9260480814508014, -18.227798373058192, 9.16194228338685, -7.821693715967115, -375.72201204229935], "height": 670, "width": 1024, "nr": 4, "markers": []}, {"filename": "641_2002_2568_NM01_s014.png", "anchoring": [484.28944520295465, 431.8224107812892, 343.35347135648357, -518.3690235883199, -3.6954675254972926, -7.19215408551122, 5.981852352340411, -7.941561803910361, -380.3979885113568], "height": 670, "width": 1024, "nr": 14, "markers": []}, {"filename": "641_2002_2568_NM01_s024.png", "anchoring": [474.6415595291062, 409.0079466659288, 323.05494233282883, -505.2442364747077, -3.56067208313857, -5.0453101962999085, 4.694938767096801, -7.801789301631459, -373.31791371291615], "height": 670, "width": 1024, "nr": 24, "markers": []}, {"filename": "641_2002_2568_NM01_s034.png", "anchoring": [472.16696439432405, 386.78228028500996, 328.47766702862134, -475.4099501825167, -3.351707296763948, -4.808891108272576, 0.9972321249586003, -7.818466209235794, -372.9077066942683], "height": 670, "width": 1024, "nr": 34, "markers": []}, {"filename": "641_2002_2568_NM01_s039.png", "anchoring": [488.4767586809239, 375.6823112198405, 326.08427552974416, -495.0874699975744, -3.15951817791489, 10.761721197043073, -13.139931984029317, -8.28072895472934, -390.3298265885487], "height": 670, "width": 1024, "nr": 39, "markers": []}, {"filename": "641_2002_2568_NM01_s044.png", "anchoring": [480.02773518728304, 364.47919683571723, 326.84333254811446, -485.275211869539, -2.9372158922565745, 18.157985103177396, -21.186256571373406, -7.928553879088213, -370.9252801465889], "height": 670, "width": 1024, "nr": 44, "markers": []}, {"filename": "641_2002_2568_NM01_s049.png", "anchoring": [486.6267436753162, 353.409818930658, 329.07203066504314, -484.3703912586601, -2.9720723196895733, 16.20209468216831, -17.81061339348446, -8.22069156760358, -385.9468334691206], "height": 670, "width": 1024, "nr": 49, "markers": []}, {"filename": "641_2002_2568_NM01_s054.png", "anchoring": [470.09975806217085, 341.8562249517062, 315.7614929260963, -481.1006472964035, -3.262579769229717, 1.2927275042317774, -5.241985664748995, -7.812365570284044, -370.58391598124484], "height": 670, "width": 1024, "nr": 54, "markers": []}, {"filename": "641_2002_2568_NM01_s059.png", "anchoring": [479.86641378118173, 330.7360048152255, 314.53517302699186, -500.48418918745347, -3.6285342829395972, -9.830380088318748, 8.46854729115529, -7.914955397960227, -379.94037215765275], "height": 670, "width": 1024, "nr": 59, "markers": []}, {"filename": "641_2002_2568_NM01_s064.png", "anchoring": [492.6358441410294, 320.1507161128536, 337.8221029014745, -491.4481689354413, -3.068966946666535, 13.890937381861647, -10.397494664402188, -8.01384113553064, -378.50512822085994], "height": 670, "width": 1024, "nr": 64, "markers": []}, {"filename": "641_2002_2568_NM01_s069.png", "anchoring": [476.73102341692606, 309.1761574469605, 351.90227673919765, -486.59352210252973, -3.2572637361274133, 3.335930620705142, -4.5746637472482234, -8.189937397159952, -388.79424848553276], "height": 670, "width": 1024, "nr": 69, "markers": []}, {"filename": "641_2002_2568_NM01_s074.png", "anchoring": [484.1573871231968, 297.54013259110616, 326.85827986479643, -484.70014206771555, -3.24657694987161, 3.228223053068916, -2.930418153544224, -7.914219408308668, -376.19091152111963], "height": 670, "width": 1024, "nr": 74, "markers": []}, {"filename": "641_2002_2568_NM01_s079.png", "anchoring": [485.96203761792447, 286.4791115343116, 331.04746848696294, -503.3114626229808, -3.3783252334765166, 3.0144469708824886, 0.4846675304806354, -8.200618585272878, -390.95185387325466], "height": 670, "width": 1024, "nr": 79, "markers": []}, {"filename": "641_2002_2568_NM01_s084.png", "anchoring": [494.26360175676894, 275.3132147273358, 328.1218495316282, -514.035303665146, -3.204759709448581, 14.779979746588879, -10.365021249107826, -8.081942124021168, -381.7610082797088], "height": 670, "width": 1024, "nr": 84, "markers": []}, {"filename": "641_2002_2568_NM01_s089.png", "anchoring": [491.66493281591556, 264.2328626894313, 332.82468801941155, -493.23656594212036, -3.2347719183102015, 6.572419705696177, -7.685124460966335, -8.031518547840392, -380.2313692570373], "height": 670, "width": 1024, "nr": 89, "markers": []}, {"filename": "641_2002_2568_NM01_s094.png", "anchoring": [488.85258141739376, 253.03268938335628, 331.8871610062102, -494.04263092651547, -3.219660671648086, 7.555197342144709, -3.6012198213345528, -7.7085128689618045, -366.16954700275375], "height": 670, "width": 1024, "nr": 94, "markers": []}, {"filename": "641_2002_2568_NM01_s099.png", "anchoring": [482.42293416718985, 242.28803606205602, 353.8358009800558, -496.8959589179719, -4.03414480312253, -30.32865616776911, 21.680704920095764, -7.974511113160759, -387.0836843374803], "height": 670, "width": 1024, "nr": 99, "markers": []}, {"filename": "641_2002_2567_NM01_s104.png", "anchoring": [473.39661660449025, 230.66544709681455, 334.7932164882177, -486.40199445040605, -2.9937042372356757, 15.833253459377943, -5.601899156638467, -7.8234734355806665, -370.9959707587368], "height": 670, "width": 1024, "nr": 104, "markers": []}, {"filename": "641_2002_2568_NM01_s109.png", "anchoring": [487.34183536244893, 219.66327991307688, 337.83099874354235, -510.89161280014144, -3.2099517050361612, 13.508188456487062, -12.002703590488522, -8.13124404748217, -383.5768093524527], "height": 670, "width": 1024, "nr": 109, "markers": []}, {"filename": "641_2002_2568_NM01_s114.png", "anchoring": [495.3129249094335, 208.48599136797057, 334.4702056297183, -505.5843096317978, -3.106727191272597, 16.697865449820597, -11.693756370994151, -8.179664360450573, -385.98491085186294], "height": 670, "width": 1024, "nr": 114, "markers": []}, {"filename": "641_2002_2568_NM01_s119.png", "anchoring": [483.0040793553484, 197.35785227793377, 340.05987828221953, -512.3120936086566, -3.1606890253025597, 16.318634218595776, -11.893066887369855, -8.167380830661358, -385.3346026794329], "height": 670, "width": 1024, "nr": 119, "markers": []}, {"filename": "641_2002_2568_NM01_s124.png", "anchoring": [480.29637824674273, 186.01092342215708, 332.0947506509051, -484.67372037014684, -2.705187690584694, 29.019093467227208, -18.92577134358544, -7.726945052628025, -362.0543591196711], "height": 670, "width": 1024, "nr": 124, "markers": []}, {"filename": "641_2002_2568_NM01_s129.png", "anchoring": [492.27775469504127, 175.1532306887408, 342.6572715655717, -507.82258598249865, -3.4457083271149713, 1.2733211807731095, -1.3604711923911168, -8.088951178684198, -385.02918732881733], "height": 670, "width": 1024, "nr": 129, "markers": []}, {"filename": "641_2002_2568_NM01_s134.png", "anchoring": [485.64153643523036, 163.70800353921777, 331.2879134165818, -504.67743770961783, -3.171870357249645, 13.298014106357357, -11.371542650173524, -8.028839230439445, -378.90246100138353], "height": 670, "width": 1024, "nr": 134, "markers": []}, {"filename": "641_2002_2568_NM01_s139.png", "anchoring": [484.948964622556, 152.8021154912605, 343.6835944773486, -513.3118572156216, -3.639138316171028, -6.155744266614022, 5.578823944669807, -7.558336613071361, -362.00436822996284], "height": 670, "width": 1024, "nr": 139, "markers": []}, {"filename": "641_2002_2568_NM01_s144.png", "anchoring": [496.59684485241974, 141.95479845895642, 354.84922917425564, -516.4648617567099, -3.555024126829437, -1.1199198788282843, 3.875669584556306, -7.917680676510656, -378.57364364399496], "height": 670, "width": 1024, "nr": 144, "markers": []}, {"filename": "641_2002_2568_NM01_s154.png", "anchoring": [491.9685425169928, 119.52379623474411, 351.1886561129903, -536.1868448270509, -3.3609434300914103, 14.55527222987621, -9.448340004175748, -8.905367303316083, -421.2993919729981], "height": 670, "width": 1024, "nr": 154, "markers": []}, {"filename": "641_2002_2568_NM01_s159.png", "anchoring": [498.51228764589314, 108.41983183153157, 351.7871485940841, -542.7456490552836, -3.376312780990304, 15.960108713454815, -13.201554896502444, -8.51426953309526, -401.4389339858796], "height": 670, "width": 1024, "nr": 159, "markers": []}, {"filename": "641_2002_2568_NM01_s164.png", "anchoring": [477.89497799995445, 96.93356217990684, 343.01773557104485, -519.1501720267376, -3.660569537101807, -5.274579442185143, 5.732858502223962, -8.228645293720732, -393.9975866053594], "height": 670, "width": 1024, "nr": 164, "markers": []}, {"filename": "641_2002_2568_NM01_s169.png", "anchoring": [478.34808772948514, 85.63637123512231, 336.39286129322875, -503.14227663325534, -3.329893799493348, 5.26725625176357, -5.556623700263856, -8.191273445455494, -388.53794257174894], "height": 670, "width": 1024, "nr": 169, "markers": []}, {"filename": "641_2002_2568_NM01_s174.png", "anchoring": [467.2885711292482, 74.61180044139991, 346.5108888503453, -489.04010148424567, -3.382960553751488, -1.8568156328477698, 2.5971142928572704, -8.084975608689177, -386.12932817536694], "height": 670, "width": 1024, "nr": 174, "markers": []}, {"filename": "641_2002_2568_NM01_s179.png", "anchoring": [480.28761166054875, 63.368350159824175, 338.35885236117144, -503.67416114673983, -3.2740882281490826, 8.09993069287168, -7.760941479995097, -8.053060330251824, -381.23321730993075], "height": 670, "width": 1024, "nr": 179, "markers": []}, {"filename": "641_2002_2568_NM01_s184.png", "anchoring": [477.9725079841031, 52.19785431207989, 338.6735424801194, -497.53423775059883, -3.270366387144314, 6.276601316680228, -7.6444828247233545, -7.999687943890905, -378.72775131617067], "height": 670, "width": 1024, "nr": 184, "markers": []}, {"filename": "641_2002_2568_NM01_s189.png", "anchoring": [478.1323847295527, 41.111988078216996, 342.2147080438157, -490.43929240303476, -3.4301333863417582, -3.6488617309539677, -0.10442537570253307, -8.27814263827306, -394.4542395204915], "height": 670, "width": 1024, "nr": 189, "markers": []}, {"filename": "641_2002_2568_NM01_s199.png", "anchoring": [472.3414766160381, 18.650141704138807, 337.46311012467544, -497.6998381418747, -3.5762882914584573, -8.247910858113585, 2.8537777980108103, -8.178300989381412, -390.6603089010761], "height": 670, "width": 1024, "nr": 199, "markers": []}]} -------------------------------------------------------------------------------- /examples/example_brain/GLTa/MyResults.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- 1 | [metadata] 2 | description-file = README.md -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | from distutils.core import setup 2 | from setuptools import find_packages 3 | from pathlib import Path 4 | 5 | 6 | this_directory = Path(__file__).parent 7 | long_description = (this_directory / "README.md").read_text() 8 | 9 | setup( 10 | name="DeepSlice", 11 | packages=find_packages(), 12 | version="{{VERSION_PLACEHOLDER}}", 13 | license="GPL-3.0", 14 | description="A package to align histology to 3D brain atlases", 15 | long_description=long_description, 16 | long_description_content_type="text/markdown", 17 | author="DeepSlice Team", 18 | package_data={ 19 | "DeepSlice": [ 20 | "metadata/volumes/placeholder.txt", 21 | "metadata/config.json", 22 | "metadata/weights/*.txt", 23 | ] 24 | }, 25 | include_package_data=True, 26 | author_email="harry.carey@medisin.uio.no", 27 | url="https://github.com/PolarBean/DeepSlice", 28 | download_url="https://github.com/PolarBean/DeepSlice/archive/refs/tags/{{VERSION_PLACEHOLDER}}.tar.gz", 29 | keywords=["histology", "brain", "atlas", "alignment"], 30 | install_requires=[ 31 | "numpy", 32 | "scikit-learn", 33 | "scikit-image", 34 | "tensorflow<=2.15.0", 35 | "h5py", 36 | "typing", 37 | "pandas", 38 | "requests", 39 | "protobuf", 40 | "lxml", 41 | "urllib3==1.26.6", 42 | ], 43 | classifiers=[ 44 | "Development Status :: 5 - Production/Stable", 45 | "Intended Audience :: Science/Research", 46 | "Topic :: Scientific/Engineering :: Bio-Informatics", 47 | "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", 48 | "Programming Language :: Python", 49 | ], 50 | ) 51 | --------------------------------------------------------------------------------