diff --git a/.gitignore b/.gitignore index aa3aedb4..add0528d 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ build .*.swp .mha .jpg +docs/source/hello.ipynb diff --git a/docs/source/conf.py b/docs/source/conf.py index aabed235..336c4c56 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -14,6 +14,79 @@ # import sys # sys.path.insert(0, os.path.abspath('.')) +# PreProcessing: + +from pathlib import Path +import shutil + + +# Copy notebooks to source + +print("########################") +print("########################") +print("########################") +print("########################") + +ROOT_DIR = Path.cwd().parent.parent +print(ROOT_DIR ) +COPYFROM = ROOT_DIR +COPYTO = ROOT_DIR / "docs" / "source" +print(COPYFROM) +print(COPYTO) +folders = ["Python", "Data", "Utilities"] +for num, folder in enumerate(folders): + print("######") + folder_from = COPYFROM/ folder + folder_to = COPYTO /folder + print(f"{folder_from}") + print(f"{folder_to}") + shutil.copytree(folder_from, folder_to) + print("******DONE*******") + +# delete all notebooks that are not wanted +NEWLOCATION = ROOT_DIR / "docs" / "source" +exclude_notobooks = [ +"Python/00_Setup.ipynb", +#"Python/01_Image_Basics.ipynb", +#"Python/02_Pythonic_Image.ipynb", +#"Python/03_Image_Details.ipynb", +#"Python/04_Image_Display.ipynb", +#"Python/05_Results_Visualization.ipynb", +#"Python/10_matplotlibs_imshow.ipynb", +"Python/11_Progress.ipynb", +#"Python/20_Expand_With_Interpolators.ipynb", +#"Python/21_Transforms_and_Resampling.ipynb", +#"Python/22_Transforms.ipynb", +#"Python/300_Segmentation_Overview.ipynb", +#"Python/30_Segmentation_Region_Growing.ipynb", +#"Python/31_Levelset_Segmentation.ipynb", +#"Python/32_Watersheds_Segmentation.ipynb", +#"Python/33_Segmentation_Thresholding_Edge_Detection.ipynb", +#"Python/34_Segmentation_Evaluation.ipynb", +#"Python/35_Segmentation_Shape_Analysis.ipynb", +#"Python/36_Microscopy_Colocalization_Distance_Analysis.ipynb", +#"Python/51_VH_Segmentation1.ipynb", +"Python/55_VH_Resample.ipynb", +#"Python/56_VH_Registration1.ipynb", +#"Python/60_Registration_Introduction.ipynb", +#"Python/61_Registration_Introduction_Continued.ipynb", +#"Python/62_Registration_Tuning.ipynb", +#"Python/63_Registration_Initialization.ipynb", +"Python/64_Registration_Memory_Time_Tradeoff.ipynb", +"Python/65_Registration_FFD.ipynb", +"Python/66_Registration_Demons.ipynb", +#"Python/67_Registration_Semiautomatic_Homework.ipynb", +#"Python/68_Registration_Errors.ipynb", +#"Python/69_x-ray-panorama.ipynb", +#"Python/70_Data_Augmentation.ipynb", +#"Python/71_Trust_But_Verify.ipynb", +] + +for nb in exclude_notobooks: + excluded_notebook = NEWLOCATION/nb + print(excluded_notebook) + excluded_notebook.unlink() + # -- Project information ----------------------------------------------------- @@ -33,8 +106,9 @@ 'sphinx_copybutton', 'nbsphinx' ] +nbsphinx_timeout = 10000 nbsphinx_allow_errors = True -nbsphinx_execute = 'never' +#nbsphinx_execute = 'never' # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -55,4 +129,4 @@ # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] \ No newline at end of file +#html_static_path = ['_static'] diff --git a/docs/source/index.rst b/docs/source/index.rst index ef93a29f..e87f9db8 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -9,9 +9,46 @@ Contents can be used for: * As a basis for your teaching activities. * As a basis for your research activities. - - - +.. toctree:: + :maxdepth: 2 + :glob: + + Python/00_Setup.ipynb + Python/01_Image_Basics.ipynb + Python/02_Pythonic_Image.ipynb + Python/03_Image_Details.ipynb + Python/04_Image_Display.ipynb + Python/05_Results_Visualization.ipynb + Python/10_matplotlibs_imshow.ipynb + Python/11_Progress.ipynb + Python/20_Expand_With_Interpolators.ipynb + Python/21_Transforms_and_Resampling.ipynb + Python/22_Transforms.ipynb + Python/300_Segmentation_Overview.ipynb + Python/30_Segmentation_Region_Growing.ipynb + Python/31_Levelset_Segmentation.ipynb + Python/32_Watersheds_Segmentation.ipynb + Python/33_Segmentation_Thresholding_Edge_Detection.ipynb + Python/34_Segmentation_Evaluation.ipynb + Python/35_Segmentation_Shape_Analysis.ipynb + Python/36_Microscopy_Colocalization_Distance_Analysis.ipynb + Python/51_VH_Segmentation1.ipynb + Python/55_VH_Resample.ipynb + Python/56_VH_Registration1.ipynb + Python/60_Registration_Introduction.ipynb + Python/61_Registration_Introduction_Continued.ipynb + Python/62_Registration_Tuning.ipynb + Python/63_Registration_Initialization.ipynb + Python/64_Registration_Memory_Time_Tradeoff.ipynb + Python/65_Registration_FFD.ipynb + Python/66_Registration_Demons.ipynb + Python/67_Registration_Semiautomatic_Homework.ipynb + Python/68_Registration_Errors.ipynb + Python/69_x-ray-panorama.ipynb + Python/70_Data_Augmentation.ipynb + Python/71_Trust_But_Verify.ipynb + + Repository on GitHub: https://github.com/InsightSoftwareConsortium/SimpleITK-Notebooks \ No newline at end of file