Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Systematic Approach of adding notebooks #335

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ build
.*.swp
.mha
.jpg
docs/source/hello.ipynb
78 changes: 76 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 -----------------------------------------------------

Expand All @@ -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']
Expand All @@ -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']
#html_static_path = ['_static']
43 changes: 40 additions & 3 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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