Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
82d3cdb
Update README.md
jnburke4 Feb 28, 2020
5604997
Update README.md
morgankindel Feb 28, 2020
8802450
Update README.md
jnburke4 Apr 21, 2020
d0e6ed9
Create ref_images
morgankindel Apr 30, 2020
c72a994
Add files via upload
morgankindel May 3, 2020
a6ab84a
Add files via upload
morgankindel May 5, 2020
e78f916
2nd commit
morgankindel May 7, 2020
27d932a
Delete image_processing.py
morgankindel May 7, 2020
f478141
Delete image_processing.py
morgankindel May 7, 2020
47a5737
Delete Scikit image Setup.ipynb
morgankindel May 7, 2020
50b3407
Delete script.ipynb
morgankindel May 7, 2020
e4a3a3d
Delete .DS_Store
morgankindel May 7, 2020
bee0c67
updated reference images
morgankindel May 7, 2020
8285c6c
Delete .DS_Store
morgankindel May 7, 2020
5871520
re-ordered reference images for grid
morgankindel May 7, 2020
2572153
Delete .DS_Store
morgankindel May 7, 2020
cbe93f0
updated main script
morgankindel May 7, 2020
00e5b61
New project description
jnburke4 May 7, 2020
304b277
update read only file
morgankindel May 7, 2020
9534001
Merge branch 'master' into master
morgankindel May 7, 2020
e4dafe2
Merge branch 'master' of https://github.com/morgankindel/project_spri…
morgankindel May 7, 2020
7ae121c
update sample images
morgankindel May 7, 2020
a903f76
Delete .DS_Store
morgankindel May 7, 2020
6aef24a
change sample images 2
morgankindel May 7, 2020
2e18d1b
reference images
jnburke4 May 7, 2020
474d3e5
added tests and seperated main code into functions
morgankindel May 8, 2020
f6d0bbc
Update README.md
morgankindel May 8, 2020
645f18c
Delete 1-checkpoint.jpg
morgankindel May 8, 2020
79ea590
Delete 2-checkpoint.jpg
morgankindel May 8, 2020
1dc255f
Delete 3-checkpoint.jpg
morgankindel May 8, 2020
d8a6929
Delete img1-checkpoint.jpg
morgankindel May 8, 2020
2c42dfd
Delete img3-checkpoint.jpg
morgankindel May 8, 2020
45911ba
Delete .DS_Store
morgankindel May 8, 2020
806c897
Delete .DS_Store
morgankindel May 8, 2020
1ba5361
Add files via upload
jnburke4 May 8, 2020
92c716b
Update README.md
jnburke4 May 8, 2020
431f2c0
Delete 1_0.46.jpg
jnburke4 May 8, 2020
97e9709
Delete 9_1.32.jpg
jnburke4 May 8, 2020
10feb26
Delete 8_1.00.jpg
jnburke4 May 8, 2020
3006fd2
Delete 7_0.70.jpg
jnburke4 May 8, 2020
15ded00
Delete 6_1.12.jpg
jnburke4 May 8, 2020
31e779d
Delete 2_0.82.jpg
jnburke4 May 8, 2020
4f9cd37
Delete 5_0.94.jpg
jnburke4 May 8, 2020
99104dd
Delete 3_1.06.jpg
jnburke4 May 8, 2020
9416159
Delete 4_0.58.jpg
jnburke4 May 8, 2020
bcfcb03
Create reference
jnburke4 May 8, 2020
7f1eba8
Merge pull request #2 from jnburke4/master
morgankindel May 8, 2020
6ab6870
Delete coordinate_match-Copy1.ipynb
morgankindel May 8, 2020
6fda014
Add files via upload
jnburke4 May 8, 2020
6b36df6
Delete grid.jpg
morgankindel May 8, 2020
a09ddfa
Add files via upload
jnburke4 May 8, 2020
dd12171
Add files via upload
jnburke4 May 8, 2020
1c07535
Add files via upload
jnburke4 May 8, 2020
3651dee
Merged .py script renamed to burkekindel
morgankindel May 8, 2020
6d7108e
Delete reference
jnburke4 May 8, 2020
71c7743
deleted unnessecary files
morgankindel May 8, 2020
dc0e2b5
Merge pull request #3 from jnburke4/master
morgankindel May 8, 2020
f8611ad
Create project_spring_2020_burkekindel
morgankindel May 8, 2020
fe314da
Delete project_spring_2020_burkekindel
morgankindel May 8, 2020
683d34f
Delete 2020pythonspring_julia.ipynb
morgankindel May 8, 2020
bc947b2
Merge branch 'master' of https://github.com/morgankindel/project_spri…
morgankindel May 8, 2020
f21c0a1
trying to resolve conflict
morgankindel May 8, 2020
81b5aef
Merge branch 'master' of https://github.com/morgankindel/project_spri…
morgankindel May 8, 2020
4c69d88
Added .new version of main.py, split into functions
morgankindel May 8, 2020
868c7d7
moved main_functions.py into _pkg folder
morgankindel May 8, 2020
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
201 changes: 201 additions & 0 deletions .ipynb_checkpoints/LICENSE-checkpoint
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/

TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

1. Definitions.

"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.

"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.

"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.

"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.

"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.

"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.

"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).

"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.

"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."

"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.

2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.

3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.

4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:

(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and

(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and

(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and

(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.

You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.

5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.

6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.

7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.

8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.

9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
13 changes: 13 additions & 0 deletions .ipynb_checkpoints/README-checkpoint.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# project_spring_2020

[![CircleCI](https://circleci.com/gh/biof309/project_spring_2020/tree/master.svg?style=shield)](https://circleci.com/gh/biof309/project_spring_2020/tree/master)


Julia Burke
Morgan Kindel
Final Project Outline
2/26/2020

Histological techniques provide us with important information about the brain, such as protein levels, which brain regions neurons are projecting to, and cell-type, at a high spatial resolution. These techniques involve sectioning the brain into many slices, often less than 50 micrometers in thickness, mounting the slices onto a slide, and imaging each slice, one at a time. Several microscopes on the NIH campus, such as the light sheet microscope, collect brain images in tiles since the total area is too large to fit in the frame of view. In order to view this data as a single composite image, the individual tiles must be stitched together. Several parameters can be changed to affect the output, such as tile overlap, image averaging, or style of blend. Using the image name and metadata, a python program can be utilized to stitch the image. Often, one of the biggest flaws with stitching programs is the appearance of lines where each tile was integrated. To combat this, one can perform image deconvolution to create a cleaner picture. This process uses an algorithm to reverse any distortion that occurs during image collection. This is performed using a point spread function; a function that describes the distortion based on the path through the instrument. Once this is determined, the inverse can be used to undo the distortion.
After an individual image is processed and can be compared with those of other experimental groups (i.e. two or more brains), it is crucial to keep the comparison consistent—that is, matching the slices from one brain to those of another. This is often done using a common reference point on the skull, called the bregma (a slice that is directly below the bregma has bregma coordinates of 0, a slice is 0.50 mm after the bregma is ‘-0.50’, and a slice that is 0.50 mm before the bregma is ‘0.50’. Mismatched coordinates and slices result in inconsistent findings, or incorrect conclusions. For example, one region of the brain, the paraventricular thalamus (PVT) is located in the middle of the brain and is spread over many slices. As slices move from the front of the brain to the back, the shape of the PVT changes in subtle, yet important ways. The most common way of accurately tracking these shape changes is to mount every brain slice in order; and manually calculate bregma coordinates. This is extremely time-consuming, especially with larger experimental groups and/or additional tissue processing (i.e. immunohistochemistry), and many researchers instead end up estimating brain region/coordinates, by visually matching sample images with those in a reference brain atlas. Although this method works well when identifying approximate coordinates for distinct brain regions (such as the prefrontal cortex and the hindbrain), using it to distinguish between proximal slices, such as those that contain PVT, lacks accuracy and precision, resulting in selecting an incorrect region of interest (ROI).
To address this issue, our script will 1) stitch the individual image 2) identify the bregma coordinates for images 3) order those images, and 4) outline the PVT based on these coordinates. After stitching, the script will compare features (based on contrast of brain vs. slide) of each image with those of a reference atlas to output a bregma coordinate and verify these matches by using the slice thickness and interval. In the second part, the images will be sorted based on these coordinates. In the last part, the range of images with coordinates that include the PVT will independently processed; the script will include PVT outline shapes that correspond to each coordinate, and these shapes will be added to the images and saved as an additional file.
23 changes: 23 additions & 0 deletions .ipynb_checkpoints/setup-checkpoint.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import setuptools

with open("README.md", "r") as fh:
long_description = fh.read()

setuptools.setup(
name="project_spring_2020_morgankindel",
version="0.0.1",
author="Morgan Kindel",
author_email="kinde108@mail.chapman.edu",
description="Final project",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/pypa/packaging_demo",
packages=setuptools.find_packages(),
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
python_requires='>=3.6',

)
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# project_spring_2020

[![CircleCI](https://circleci.com/gh/biof309/project_spring_2020/tree/master.svg?style=shield)](https://circleci.com/gh/biof309/project_spring_2020/tree/master)

Julia Burke
Morgan Kindel
Final Project Outline
2/26/2020
=======
Histological techniques provide us with important information about the brain, such as protein levels, which brain regions neurons are projecting to, and cell-type, at a high spatial resolution. These techniques involve sectioning the brain into many slices, often less than 50 micrometers in thickness, mounting the slices onto a slide, and imaging each slice, one at a time.
To compare brains from different experimental groups and different brain regions among each other, a common reference point on the skull, called the bregma is used to determine loction (a slice that is directly below the bregma has bregma coordinates of 0, a slice is 0.50 mm after the bregma is ‘-0.50’, and a slice that is 0.50 mm before the bregma is ‘0.50’.) Mismatched coordinates and slices result in inconsistent findings, or incorrect conclusions. For example, one region of the brain, the paraventricular thalamus (PVT) is located in the middle of the brain and is spread over many slices. As slices move from the front of the brain to the back, the shape of the PVT changes in subtle, yet important ways. The most common way of accurately tracking these shape changes is to mount every brain slice in order; and manually calculate bregma coordinates. Many researchers end up estimating brain region/coordinates, by visually matching sample images with those in a reference brain atlas. Although this method works well when identifying approximate coordinates for distinct brain regions (such as the prefrontal cortex and the hindbrain), using it to distinguish between proximal slices, such as those that contain PVT, lacks accuracy and precision, resulting in selecting an incorrect region of interest (ROI).
To address this issue, our script will identify the bregma coordinates for images by matching an input image to a refrence image.

Our code compares an input image to refrence images; it is set up so that it cycles through each of the images in the input, and saves a new image with the matched refrence in a box.
1 change: 0 additions & 1 deletion project_spring_2020/sample_file.py

This file was deleted.

Binary file not shown.

Large diffs are not rendered by default.

Loading