Skip to content

Commit

Permalink
deploy: 65df67f
Browse files Browse the repository at this point in the history
  • Loading branch information
Karl5766 committed Dec 13, 2024
1 parent 3c96c23 commit c94c808
Show file tree
Hide file tree
Showing 20 changed files with 306 additions and 5 deletions.
1 change: 1 addition & 0 deletions API/algs.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../index.html">Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="../GettingStarted/quick_start.html">Quickstart</a></li>
<li class="toctree-l1"><a class="reference internal" href="../GettingStarted/ome_zarr.html">Viewing and IO of OME Zarr</a></li>
<li class="toctree-l1"><a class="reference internal" href="../GettingStarted/setting_up_the_script.html">Setting Up the Script</a></li>
<li class="toctree-l1"><a class="reference internal" href="../GettingStarted/segmentation_pipeline.html">Defining Segmentation Pipeline</a></li>
Expand Down
1 change: 1 addition & 0 deletions API/napari_zarr.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../index.html">Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="../GettingStarted/quick_start.html">Quickstart</a></li>
<li class="toctree-l1"><a class="reference internal" href="../GettingStarted/ome_zarr.html">Viewing and IO of OME Zarr</a></li>
<li class="toctree-l1"><a class="reference internal" href="../GettingStarted/setting_up_the_script.html">Setting Up the Script</a></li>
<li class="toctree-l1"><a class="reference internal" href="../GettingStarted/segmentation_pipeline.html">Defining Segmentation Pipeline</a></li>
Expand Down
1 change: 1 addition & 0 deletions API/ndblock.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../index.html">Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="../GettingStarted/quick_start.html">Quickstart</a></li>
<li class="toctree-l1"><a class="reference internal" href="../GettingStarted/ome_zarr.html">Viewing and IO of OME Zarr</a></li>
<li class="toctree-l1"><a class="reference internal" href="../GettingStarted/setting_up_the_script.html">Setting Up the Script</a></li>
<li class="toctree-l1"><a class="reference internal" href="../GettingStarted/segmentation_pipeline.html">Defining Segmentation Pipeline</a></li>
Expand Down
1 change: 1 addition & 0 deletions API/ome_zarr_io.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../index.html">Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="../GettingStarted/quick_start.html">Quickstart</a></li>
<li class="toctree-l1"><a class="reference internal" href="../GettingStarted/ome_zarr.html">Viewing and IO of OME Zarr</a></li>
<li class="toctree-l1"><a class="reference internal" href="../GettingStarted/setting_up_the_script.html">Setting Up the Script</a></li>
<li class="toctree-l1"><a class="reference internal" href="../GettingStarted/segmentation_pipeline.html">Defining Segmentation Pipeline</a></li>
Expand Down
1 change: 1 addition & 0 deletions API/seg_process.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../index.html">Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="../GettingStarted/quick_start.html">Quickstart</a></li>
<li class="toctree-l1"><a class="reference internal" href="../GettingStarted/ome_zarr.html">Viewing and IO of OME Zarr</a></li>
<li class="toctree-l1"><a class="reference internal" href="../GettingStarted/setting_up_the_script.html">Setting Up the Script</a></li>
<li class="toctree-l1"><a class="reference internal" href="../GettingStarted/segmentation_pipeline.html">Defining Segmentation Pipeline</a></li>
Expand Down
1 change: 1 addition & 0 deletions API/tlfs.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../index.html">Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="../GettingStarted/quick_start.html">Quickstart</a></li>
<li class="toctree-l1"><a class="reference internal" href="../GettingStarted/ome_zarr.html">Viewing and IO of OME Zarr</a></li>
<li class="toctree-l1"><a class="reference internal" href="../GettingStarted/setting_up_the_script.html">Setting Up the Script</a></li>
<li class="toctree-l1"><a class="reference internal" href="../GettingStarted/segmentation_pipeline.html">Defining Segmentation Pipeline</a></li>
Expand Down
1 change: 1 addition & 0 deletions GettingStarted/beta_amyloid_plaque_detection.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../index.html">Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="quick_start.html">Quickstart</a></li>
<li class="toctree-l1"><a class="reference internal" href="ome_zarr.html">Viewing and IO of OME Zarr</a></li>
<li class="toctree-l1"><a class="reference internal" href="setting_up_the_script.html">Setting Up the Script</a></li>
<li class="toctree-l1"><a class="reference internal" href="segmentation_pipeline.html">Defining Segmentation Pipeline</a></li>
Expand Down
1 change: 1 addition & 0 deletions GettingStarted/nnunet.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../index.html">Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="quick_start.html">Quickstart</a></li>
<li class="toctree-l1"><a class="reference internal" href="ome_zarr.html">Viewing and IO of OME Zarr</a></li>
<li class="toctree-l1"><a class="reference internal" href="setting_up_the_script.html">Setting Up the Script</a></li>
<li class="toctree-l1"><a class="reference internal" href="segmentation_pipeline.html">Defining Segmentation Pipeline</a></li>
Expand Down
5 changes: 3 additions & 2 deletions GettingStarted/ome_zarr.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Setting Up the Script" href="setting_up_the_script.html" />
<link rel="prev" title="Introduction - cvpl_tools documentation" href="../index.html" />
<link rel="prev" title="Quickstart" href="quick_start.html" />
</head>

<body class="wy-body-for-nav">
Expand All @@ -47,6 +47,7 @@
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../index.html">Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="quick_start.html">Quickstart</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Viewing and IO of OME Zarr</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#viewing-of-ome-zarr-file">Viewing of ome zarr file</a></li>
<li class="toctree-l2"><a class="reference internal" href="#reading-and-writing-ome-zarr-files">Reading and Writing ome zarr files</a></li>
Expand Down Expand Up @@ -199,7 +200,7 @@ <h2>Specifying slices in path<a class="headerlink" href="#specifying-slices-in-p
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="../index.html" class="btn btn-neutral float-left" title="Introduction - cvpl_tools documentation" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="quick_start.html" class="btn btn-neutral float-left" title="Quickstart" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="setting_up_the_script.html" class="btn btn-neutral float-right" title="Setting Up the Script" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>

Expand Down
177 changes: 177 additions & 0 deletions GettingStarted/quick_start.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Quickstart &mdash; cvpl_tools 0.8.2 documentation</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="../_static/css/theme.css?v=19f00094" />


<!--[if lt IE 9]>
<script src="../_static/js/html5shiv.min.js"></script>
<![endif]-->

<script src="../_static/jquery.js?v=5d32c60e"></script>
<script src="../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js?v=f9948e0f"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=4825356b"></script>
<script src="../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="OME_ZARR" href="ome_zarr.html" />
<link rel="prev" title="Introduction - cvpl_tools documentation" href="../index.html" />
</head>

<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >



<a href="../index.html" class="icon icon-home">
cvpl_tools
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../index.html">Introduction</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Quickstart</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#installation">Installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="#ome-zarr">OME ZARR</a></li>
<li class="toctree-l2"><a class="reference internal" href="#nn-unet">nn-UNet</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="ome_zarr.html">Viewing and IO of OME Zarr</a></li>
<li class="toctree-l1"><a class="reference internal" href="setting_up_the_script.html">Setting Up the Script</a></li>
<li class="toctree-l1"><a class="reference internal" href="segmentation_pipeline.html">Defining Segmentation Pipeline</a></li>
<li class="toctree-l1"><a class="reference internal" href="result_caching.html">Result Caching</a></li>
<li class="toctree-l1"><a class="reference internal" href="nnunet.html">nn-UNet</a></li>
<li class="toctree-l1"><a class="reference internal" href="beta_amyloid_plaque_detection.html">Beta-Amyloid Plaque Detection</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">API Reference</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../API/napari_zarr.html">cvpl_tools.ome_zarr.napari.add.py</a></li>
<li class="toctree-l1"><a class="reference internal" href="../API/ome_zarr_io.html">cvpl_tools.ome_zarr.io.py</a></li>
<li class="toctree-l1"><a class="reference internal" href="../API/tlfs.html">cvpl_tools.tools.fs.py</a></li>
<li class="toctree-l1"><a class="reference internal" href="../API/ndblock.html">cvpl_tools.im.ndblock.py</a></li>
<li class="toctree-l1"><a class="reference internal" href="../API/seg_process.html">cvpl_tools.im.process</a></li>
<li class="toctree-l1"><a class="reference internal" href="../API/algs.html">cvpl_tools.im.algs</a></li>
</ul>

</div>
</div>
</nav>

<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../index.html">cvpl_tools</a>
</nav>

<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item active">Quickstart</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/GettingStarted/quick_start.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">

<section id="quickstart">
<span id="quick-start"></span><h1>Quickstart<a class="headerlink" href="#quickstart" title="Permalink to this heading"></a></h1>
<section id="installation">
<h2>Installation<a class="headerlink" href="#installation" title="Permalink to this heading"></a></h2>
<p>Create an Anaconda environment, and install <a class="reference external" href="https://pytorch.org/get-started/locally/">torch</a> (with GPU
if you need training besides prediction). Check the following environment are installed as well
(use Python 3.11 if you work with SPIMquant environment):</p>
<p>Then <code class="code docutils literal notranslate"><span class="pre">pip</span> <span class="pre">install</span> <span class="pre">cvpl_tools</span></code> to finish the installation.</p>
</section>
<section id="ome-zarr">
<h2>OME ZARR<a class="headerlink" href="#ome-zarr" title="Permalink to this heading"></a></h2>
<p>Create an example OME ZARR, write it to disk and read back:</p>
<p>Read and write can be done on network location. An example of read and display:</p>
</section>
<section id="nn-unet">
<h2>nn-UNet<a class="headerlink" href="#nn-unet" title="Permalink to this heading"></a></h2>
<p>Download the training (o22)/testing (o23) annotations from Google Drive as follows:</p>
<ol class="arabic simple">
<li><p><a class="reference external" href="https://drive.google.com/file/d/1S8xNdWD1pznAMaKsrjncBySkHVO5b3HR/view?usp=drive_link">o22</a></p></li>
<li><p><a class="reference external" href="https://drive.google.com/file/d/1xhxLA0RnxoL3c1ojSGTCAIB5yp-Wfrgh/view?usp=drive_link">o23</a></p></li>
</ol>
<p>Put the canvas_o22.tiff file in the same folder as your script, then pair o22 annotation tiff file with the
corresponding training input image volume and start training:</p>
<div class="highlight-Python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">cvpl_tools.examples.mousebrain_processing</span> <span class="kn">import</span> <span class="n">main</span><span class="p">,</span> <span class="n">get_subject</span>
<span class="kn">import</span> <span class="nn">cvpl_tools.nnunet.triplanar</span> <span class="k">as</span> <span class="nn">triplanar</span>

<span class="n">SUBJECT_ID</span> <span class="o">=</span> <span class="s1">&#39;o22&#39;</span>
<span class="n">SUBJECTS_DIR</span> <span class="o">=</span> <span class="sa">f</span><span class="s1">&#39;subjects&#39;</span>
<span class="n">NNUNET_CACHE_DIR</span> <span class="o">=</span> <span class="sa">f</span><span class="s1">&#39;nnunet_250epoch&#39;</span>
<span class="n">subject</span> <span class="o">=</span> <span class="n">get_subject</span><span class="p">(</span><span class="n">SUBJECT_ID</span><span class="p">,</span> <span class="n">SUBJECTS_DIR</span><span class="p">,</span> <span class="n">NNUNET_CACHE_DIR</span><span class="p">)</span>
<span class="n">main</span><span class="p">(</span><span class="n">subject</span><span class="o">=</span><span class="n">subject</span><span class="p">,</span> <span class="n">run_nnunet</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">run_coiled_process</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>

<span class="n">train_args</span> <span class="o">=</span> <span class="p">{</span>
<span class="s2">&quot;cache_url&quot;</span><span class="p">:</span> <span class="n">NNUNET_CACHE_DIR</span><span class="p">,</span>
<span class="s2">&quot;train_im&quot;</span><span class="p">:</span> <span class="n">subject</span><span class="o">.</span><span class="n">SECOND_DOWNSAMPLE_CORR_PATH</span><span class="p">,</span> <span class="c1"># image</span>
<span class="s2">&quot;train_seg&quot;</span><span class="p">:</span> <span class="s1">&#39;canvas_o22.tiff&#39;</span><span class="p">,</span> <span class="c1"># label</span>
<span class="s2">&quot;nepoch&quot;</span><span class="p">:</span> <span class="mi">250</span><span class="p">,</span>
<span class="s2">&quot;stack_channels&quot;</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span>
<span class="s2">&quot;triplanar&quot;</span><span class="p">:</span> <span class="kc">False</span><span class="p">,</span>
<span class="s2">&quot;dataset_id&quot;</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span>
<span class="s2">&quot;fold&quot;</span><span class="p">:</span> <span class="s1">&#39;0&#39;</span><span class="p">,</span>
<span class="s2">&quot;max_threshold&quot;</span><span class="p">:</span> <span class="mf">7500.</span><span class="p">,</span>
<span class="p">}</span>
<span class="n">triplanar</span><span class="o">.</span><span class="n">train_triplanar</span><span class="p">(</span><span class="n">train_args</span><span class="p">)</span>
</pre></div>
</div>
</section>
</section>


</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="../index.html" class="btn btn-neutral float-left" title="Introduction - cvpl_tools documentation" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="ome_zarr.html" class="btn btn-neutral float-right" title="OME_ZARR" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>

<hr/>

<div role="contentinfo">
<p>&#169; Copyright 2024, KarlHanUW.</p>
</div>

Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.


</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>

</body>
</html>
1 change: 1 addition & 0 deletions GettingStarted/result_caching.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../index.html">Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="quick_start.html">Quickstart</a></li>
<li class="toctree-l1"><a class="reference internal" href="ome_zarr.html">Viewing and IO of OME Zarr</a></li>
<li class="toctree-l1"><a class="reference internal" href="setting_up_the_script.html">Setting Up the Script</a></li>
<li class="toctree-l1"><a class="reference internal" href="segmentation_pipeline.html">Defining Segmentation Pipeline</a></li>
Expand Down
Loading

0 comments on commit c94c808

Please sign in to comment.