Rhapso 0.1.92__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- Rhapso/__init__.py +1 -0
- Rhapso/data_prep/__init__.py +2 -0
- Rhapso/data_prep/n5_reader.py +188 -0
- Rhapso/data_prep/s3_big_stitcher_reader.py +55 -0
- Rhapso/data_prep/xml_to_dataframe.py +215 -0
- Rhapso/detection/__init__.py +5 -0
- Rhapso/detection/advanced_refinement.py +203 -0
- Rhapso/detection/difference_of_gaussian.py +324 -0
- Rhapso/detection/image_reader.py +117 -0
- Rhapso/detection/metadata_builder.py +130 -0
- Rhapso/detection/overlap_detection.py +327 -0
- Rhapso/detection/points_validation.py +49 -0
- Rhapso/detection/save_interest_points.py +265 -0
- Rhapso/detection/view_transform_models.py +67 -0
- Rhapso/fusion/__init__.py +0 -0
- Rhapso/fusion/affine_fusion/__init__.py +2 -0
- Rhapso/fusion/affine_fusion/blend.py +289 -0
- Rhapso/fusion/affine_fusion/fusion.py +601 -0
- Rhapso/fusion/affine_fusion/geometry.py +159 -0
- Rhapso/fusion/affine_fusion/io.py +546 -0
- Rhapso/fusion/affine_fusion/script_utils.py +111 -0
- Rhapso/fusion/affine_fusion/setup.py +4 -0
- Rhapso/fusion/affine_fusion_worker.py +234 -0
- Rhapso/fusion/multiscale/__init__.py +0 -0
- Rhapso/fusion/multiscale/aind_hcr_data_transformation/__init__.py +19 -0
- Rhapso/fusion/multiscale/aind_hcr_data_transformation/compress/__init__.py +3 -0
- Rhapso/fusion/multiscale/aind_hcr_data_transformation/compress/czi_to_zarr.py +698 -0
- Rhapso/fusion/multiscale/aind_hcr_data_transformation/compress/zarr_writer.py +265 -0
- Rhapso/fusion/multiscale/aind_hcr_data_transformation/models.py +81 -0
- Rhapso/fusion/multiscale/aind_hcr_data_transformation/utils/__init__.py +3 -0
- Rhapso/fusion/multiscale/aind_hcr_data_transformation/utils/utils.py +526 -0
- Rhapso/fusion/multiscale/aind_hcr_data_transformation/zeiss_job.py +249 -0
- Rhapso/fusion/multiscale/aind_z1_radial_correction/__init__.py +21 -0
- Rhapso/fusion/multiscale/aind_z1_radial_correction/array_to_zarr.py +257 -0
- Rhapso/fusion/multiscale/aind_z1_radial_correction/radial_correction.py +557 -0
- Rhapso/fusion/multiscale/aind_z1_radial_correction/run_capsule.py +98 -0
- Rhapso/fusion/multiscale/aind_z1_radial_correction/utils/__init__.py +3 -0
- Rhapso/fusion/multiscale/aind_z1_radial_correction/utils/utils.py +266 -0
- Rhapso/fusion/multiscale/aind_z1_radial_correction/worker.py +89 -0
- Rhapso/fusion/multiscale_worker.py +113 -0
- Rhapso/fusion/neuroglancer_link_gen/__init__.py +8 -0
- Rhapso/fusion/neuroglancer_link_gen/dispim_link.py +235 -0
- Rhapso/fusion/neuroglancer_link_gen/exaspim_link.py +127 -0
- Rhapso/fusion/neuroglancer_link_gen/hcr_link.py +368 -0
- Rhapso/fusion/neuroglancer_link_gen/iSPIM_top.py +47 -0
- Rhapso/fusion/neuroglancer_link_gen/link_utils.py +239 -0
- Rhapso/fusion/neuroglancer_link_gen/main.py +299 -0
- Rhapso/fusion/neuroglancer_link_gen/ng_layer.py +1434 -0
- Rhapso/fusion/neuroglancer_link_gen/ng_state.py +1123 -0
- Rhapso/fusion/neuroglancer_link_gen/parsers.py +336 -0
- Rhapso/fusion/neuroglancer_link_gen/raw_link.py +116 -0
- Rhapso/fusion/neuroglancer_link_gen/utils/__init__.py +4 -0
- Rhapso/fusion/neuroglancer_link_gen/utils/shader_utils.py +85 -0
- Rhapso/fusion/neuroglancer_link_gen/utils/transfer.py +43 -0
- Rhapso/fusion/neuroglancer_link_gen/utils/utils.py +303 -0
- Rhapso/fusion/neuroglancer_link_gen_worker.py +30 -0
- Rhapso/matching/__init__.py +0 -0
- Rhapso/matching/load_and_transform_points.py +458 -0
- Rhapso/matching/ransac_matching.py +544 -0
- Rhapso/matching/save_matches.py +120 -0
- Rhapso/matching/xml_parser.py +302 -0
- Rhapso/pipelines/__init__.py +0 -0
- Rhapso/pipelines/ray/__init__.py +0 -0
- Rhapso/pipelines/ray/aws/__init__.py +0 -0
- Rhapso/pipelines/ray/aws/alignment_pipeline.py +227 -0
- Rhapso/pipelines/ray/aws/config/__init__.py +0 -0
- Rhapso/pipelines/ray/evaluation.py +71 -0
- Rhapso/pipelines/ray/interest_point_detection.py +137 -0
- Rhapso/pipelines/ray/interest_point_matching.py +110 -0
- Rhapso/pipelines/ray/local/__init__.py +0 -0
- Rhapso/pipelines/ray/local/alignment_pipeline.py +167 -0
- Rhapso/pipelines/ray/matching_stats.py +104 -0
- Rhapso/pipelines/ray/param/__init__.py +0 -0
- Rhapso/pipelines/ray/solver.py +120 -0
- Rhapso/pipelines/ray/split_dataset.py +78 -0
- Rhapso/solver/__init__.py +0 -0
- Rhapso/solver/compute_tiles.py +562 -0
- Rhapso/solver/concatenate_models.py +116 -0
- Rhapso/solver/connected_graphs.py +111 -0
- Rhapso/solver/data_prep.py +181 -0
- Rhapso/solver/global_optimization.py +410 -0
- Rhapso/solver/model_and_tile_setup.py +109 -0
- Rhapso/solver/pre_align_tiles.py +323 -0
- Rhapso/solver/save_results.py +97 -0
- Rhapso/solver/view_transforms.py +75 -0
- Rhapso/solver/xml_to_dataframe_solver.py +213 -0
- Rhapso/split_dataset/__init__.py +0 -0
- Rhapso/split_dataset/compute_grid_rules.py +78 -0
- Rhapso/split_dataset/save_points.py +101 -0
- Rhapso/split_dataset/save_xml.py +377 -0
- Rhapso/split_dataset/split_images.py +537 -0
- Rhapso/split_dataset/xml_to_dataframe_split.py +219 -0
- rhapso-0.1.92.dist-info/METADATA +39 -0
- rhapso-0.1.92.dist-info/RECORD +101 -0
- rhapso-0.1.92.dist-info/WHEEL +5 -0
- rhapso-0.1.92.dist-info/licenses/LICENSE +21 -0
- rhapso-0.1.92.dist-info/top_level.txt +2 -0
- tests/__init__.py +1 -0
- tests/test_detection.py +17 -0
- tests/test_matching.py +21 -0
- tests/test_solving.py +21 -0
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import pandas as pd
|
|
2
|
+
import xml.etree.ElementTree as ET
|
|
3
|
+
|
|
4
|
+
# This component recieves an XML file containing Tiff or Zarr image metadata and converts
|
|
5
|
+
# it into several Dataframes
|
|
6
|
+
|
|
7
|
+
class XMLToDataFrameSplit:
|
|
8
|
+
def __init__(self, xml_file):
|
|
9
|
+
self.xml_content = xml_file
|
|
10
|
+
|
|
11
|
+
def parse_image_loader_zarr(self, root):
|
|
12
|
+
"""
|
|
13
|
+
Parses image loader configuration from a Zarr file's XML structure and constructs a DataFrame containing the
|
|
14
|
+
metadata for each image group.
|
|
15
|
+
"""
|
|
16
|
+
image_loader_data = []
|
|
17
|
+
|
|
18
|
+
for il in root.findall(".//ImageLoader/zgroups/zgroup"):
|
|
19
|
+
view_setup = il.get("setup")
|
|
20
|
+
timepoint = il.get("timepoint")
|
|
21
|
+
file_path = il.find("path").text if il.find("path") is not None else None
|
|
22
|
+
|
|
23
|
+
channel = file_path.split("_ch_", 1)[1].split(".ome.zarr", 1)[0]
|
|
24
|
+
|
|
25
|
+
image_loader_data.append(
|
|
26
|
+
{
|
|
27
|
+
"view_setup": view_setup,
|
|
28
|
+
"timepoint": timepoint,
|
|
29
|
+
"series": 1,
|
|
30
|
+
"channel": channel,
|
|
31
|
+
"file_path": file_path,
|
|
32
|
+
}
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
return pd.DataFrame(image_loader_data)
|
|
36
|
+
|
|
37
|
+
def parse_image_loader_tiff(self, root):
|
|
38
|
+
"""
|
|
39
|
+
Parses image loader configuration from a TIFF file's XML structure and constructs a DataFrame containing
|
|
40
|
+
metadata for each image group.
|
|
41
|
+
"""
|
|
42
|
+
image_loader_data = []
|
|
43
|
+
|
|
44
|
+
# Ensure that file mappings are present in the XML
|
|
45
|
+
if not root.findall(".//ImageLoader/files/FileMapping"):
|
|
46
|
+
raise Exception("There are no files in this XML")
|
|
47
|
+
|
|
48
|
+
# Check for required labels in the XML
|
|
49
|
+
if not self.check_labels(root):
|
|
50
|
+
raise Exception("Required labels do not exist")
|
|
51
|
+
|
|
52
|
+
# Validate that the lengths of view setups, registrations, and tiles match
|
|
53
|
+
if not self.check_length(root):
|
|
54
|
+
raise Exception(
|
|
55
|
+
"The amount of view setups, view registrations, and tiles do not match"
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
# Iterate over each file mapping in the XML
|
|
59
|
+
for fm in root.findall(".//ImageLoader/files/FileMapping"):
|
|
60
|
+
view_setup = fm.get("view_setup")
|
|
61
|
+
timepoint = fm.get("timepoint")
|
|
62
|
+
series = fm.get("series")
|
|
63
|
+
channel = fm.get("channel")
|
|
64
|
+
file_path = fm.find("file").text if fm.find("file") is not None else None
|
|
65
|
+
|
|
66
|
+
image_loader_data.append(
|
|
67
|
+
{
|
|
68
|
+
"view_setup": view_setup,
|
|
69
|
+
"timepoint": timepoint,
|
|
70
|
+
"series": series,
|
|
71
|
+
"channel": channel,
|
|
72
|
+
"file_path": file_path,
|
|
73
|
+
}
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
# Convert the list to a DataFrame and return
|
|
77
|
+
return pd.DataFrame(image_loader_data)
|
|
78
|
+
|
|
79
|
+
def parse_image_loader_split_zarr(self):
|
|
80
|
+
pass
|
|
81
|
+
|
|
82
|
+
def route_image_loader(self, root):
|
|
83
|
+
"""
|
|
84
|
+
Directs the XML parsing process based on the image loader format specified in the XML.
|
|
85
|
+
"""
|
|
86
|
+
format_node = root.find(".//ImageLoader")
|
|
87
|
+
format_type = format_node.get("format")
|
|
88
|
+
|
|
89
|
+
if "filemap" in format_type:
|
|
90
|
+
return self.parse_image_loader_tiff(root)
|
|
91
|
+
else:
|
|
92
|
+
return self.parse_image_loader_zarr(root)
|
|
93
|
+
|
|
94
|
+
def parse_view_setups(self, root):
|
|
95
|
+
"""
|
|
96
|
+
Parses the view setups from an XML structure and constructs a DataFrame containing metadata for each view setup.
|
|
97
|
+
"""
|
|
98
|
+
viewsetups_data = []
|
|
99
|
+
|
|
100
|
+
for vs in root.findall(".//ViewSetup"):
|
|
101
|
+
id_ = vs.find("id").text
|
|
102
|
+
name = vs.findtext("name")
|
|
103
|
+
size = vs.find("size").text
|
|
104
|
+
voxel_unit = vs.find(".//voxelSize/unit").text
|
|
105
|
+
voxel_size = " ".join(vs.find(".//voxelSize/size").text.split())
|
|
106
|
+
attrs = vs.find("attributes")
|
|
107
|
+
illumination = int(attrs.findtext("illumination")) if attrs is not None and attrs.findtext("illumination") is not None else None
|
|
108
|
+
channel = int(attrs.findtext("channel")) if attrs is not None and attrs.findtext("channel") is not None else None
|
|
109
|
+
tile = int(attrs.findtext("tile")) if attrs is not None and attrs.findtext("tile") is not None else None
|
|
110
|
+
angle = int(attrs.findtext("angle")) if attrs is not None and attrs.findtext("angle") is not None else None
|
|
111
|
+
|
|
112
|
+
viewsetups_data.append(
|
|
113
|
+
{
|
|
114
|
+
"id": id_,
|
|
115
|
+
"name": name,
|
|
116
|
+
"size": size,
|
|
117
|
+
"voxel_unit": voxel_unit,
|
|
118
|
+
"voxel_size": voxel_size,
|
|
119
|
+
"illumination": illumination,
|
|
120
|
+
"channel": channel,
|
|
121
|
+
"tile": tile,
|
|
122
|
+
"angle": angle,
|
|
123
|
+
}
|
|
124
|
+
)
|
|
125
|
+
return pd.DataFrame(viewsetups_data)
|
|
126
|
+
|
|
127
|
+
def parse_view_registrations(self, root):
|
|
128
|
+
"""
|
|
129
|
+
Parses view registrations from an XML structure and constructs a DataFrame containing registration metadata
|
|
130
|
+
for each view.
|
|
131
|
+
"""
|
|
132
|
+
viewregistrations_data = []
|
|
133
|
+
for vr in root.findall(".//ViewRegistration"):
|
|
134
|
+
timepoint = vr.get("timepoint")
|
|
135
|
+
setup = vr.get("setup")
|
|
136
|
+
|
|
137
|
+
for vt in vr.findall(".//ViewTransform"):
|
|
138
|
+
affine_text = (
|
|
139
|
+
vt.find("affine").text.replace("\n", "").replace(" ", ", ")
|
|
140
|
+
)
|
|
141
|
+
viewregistrations_data.append(
|
|
142
|
+
{
|
|
143
|
+
"timepoint": timepoint,
|
|
144
|
+
"setup": setup,
|
|
145
|
+
"type": vt.get("type"),
|
|
146
|
+
"name": vt.find("Name").text.strip(),
|
|
147
|
+
"affine": affine_text,
|
|
148
|
+
}
|
|
149
|
+
)
|
|
150
|
+
return pd.DataFrame(viewregistrations_data)
|
|
151
|
+
|
|
152
|
+
def parse_view_interest_points(self, root):
|
|
153
|
+
"""
|
|
154
|
+
Parses interest points data from an XML structure and constructs a DataFrame containing metadata and paths
|
|
155
|
+
for each set of interest points.
|
|
156
|
+
"""
|
|
157
|
+
view_interest_points_data = []
|
|
158
|
+
|
|
159
|
+
for vip in root.findall(".//ViewInterestPointsFile"):
|
|
160
|
+
timepoint = vip.get("timepoint")
|
|
161
|
+
setup = vip.get("setup")
|
|
162
|
+
label = vip.get("label")
|
|
163
|
+
params = vip.get("params")
|
|
164
|
+
path = vip.text.strip() if vip.text is not None else None
|
|
165
|
+
view_interest_points_data.append(
|
|
166
|
+
{
|
|
167
|
+
"timepoint": timepoint,
|
|
168
|
+
"setup": setup,
|
|
169
|
+
"label": label,
|
|
170
|
+
"params": params,
|
|
171
|
+
"path": path,
|
|
172
|
+
}
|
|
173
|
+
)
|
|
174
|
+
return pd.DataFrame(view_interest_points_data)
|
|
175
|
+
|
|
176
|
+
def check_labels(self, root):
|
|
177
|
+
"""
|
|
178
|
+
Verifies the presence of required XML labels including bounding boxes, point spread functions,
|
|
179
|
+
stitching results, and intensity adjustments.
|
|
180
|
+
"""
|
|
181
|
+
labels = True
|
|
182
|
+
if root.find(".//BoundingBoxes") is None:
|
|
183
|
+
labels = False
|
|
184
|
+
if root.find(".//PointSpreadFunctions") is None:
|
|
185
|
+
labels = False
|
|
186
|
+
if root.find(".//StitchingResults") is None:
|
|
187
|
+
labels = False
|
|
188
|
+
if root.find(".//IntensityAdjustments") is None:
|
|
189
|
+
labels = False
|
|
190
|
+
|
|
191
|
+
return labels
|
|
192
|
+
|
|
193
|
+
def check_length(self, root):
|
|
194
|
+
"""
|
|
195
|
+
Validates that the count of elements within the XML structure aligns with expected relationships
|
|
196
|
+
between file mappings, view setups, and view registrations.
|
|
197
|
+
"""
|
|
198
|
+
length = True
|
|
199
|
+
if len(root.findall(".//ImageLoader/files/FileMapping")) != len(root.findall(".//ViewRegistration")) or \
|
|
200
|
+
len(root.findall(".//ViewSetup")) != len(root.findall(".//ViewRegistration")) * (1 / 2):
|
|
201
|
+
length = False # Set to False if the relationships do not match expected counts
|
|
202
|
+
return length
|
|
203
|
+
|
|
204
|
+
def run(self):
|
|
205
|
+
"""
|
|
206
|
+
Executes the entry point of the script.
|
|
207
|
+
"""
|
|
208
|
+
root = ET.fromstring(self.xml_content)
|
|
209
|
+
image_loader_df = self.route_image_loader(root)
|
|
210
|
+
view_setups_df = self.parse_view_setups(root)
|
|
211
|
+
view_registrations_df = self.parse_view_registrations(root)
|
|
212
|
+
view_interest_points_df = self.parse_view_interest_points(root)
|
|
213
|
+
|
|
214
|
+
return {
|
|
215
|
+
"image_loader": image_loader_df,
|
|
216
|
+
"view_setups": view_setups_df,
|
|
217
|
+
"view_registrations": view_registrations_df,
|
|
218
|
+
"view_interest_points": view_interest_points_df,
|
|
219
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: Rhapso
|
|
3
|
+
Version: 0.1.92
|
|
4
|
+
Summary: A python package for aligning and stitching light sheet fluorescence microscopy images together
|
|
5
|
+
Author: ND
|
|
6
|
+
Author-email: sean.fite@alleninstitute.org
|
|
7
|
+
Classifier: Development Status :: 3 - Alpha
|
|
8
|
+
Classifier: Intended Audience :: Developers
|
|
9
|
+
Classifier: Natural Language :: English
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Requires-Python: >=3.7
|
|
17
|
+
License-File: LICENSE
|
|
18
|
+
Requires-Dist: pandas
|
|
19
|
+
Requires-Dist: dask[array]==2024.12.1
|
|
20
|
+
Requires-Dist: zarr==2.18.3
|
|
21
|
+
Requires-Dist: scipy==1.13.1
|
|
22
|
+
Requires-Dist: scikit-image
|
|
23
|
+
Requires-Dist: bioio==1.3.0
|
|
24
|
+
Requires-Dist: bioio-tifffile==1.0.0
|
|
25
|
+
Requires-Dist: tifffile==2025.1.10
|
|
26
|
+
Requires-Dist: dask-image==2024.5.3
|
|
27
|
+
Requires-Dist: boto3==1.35.92
|
|
28
|
+
Requires-Dist: numcodecs==0.13.1
|
|
29
|
+
Requires-Dist: matplotlib==3.10.0
|
|
30
|
+
Requires-Dist: memory-profiler==0.61.0
|
|
31
|
+
Requires-Dist: s3fs==2024.12.0
|
|
32
|
+
Requires-Dist: scikit-learn
|
|
33
|
+
Dynamic: author
|
|
34
|
+
Dynamic: author-email
|
|
35
|
+
Dynamic: classifier
|
|
36
|
+
Dynamic: license-file
|
|
37
|
+
Dynamic: requires-dist
|
|
38
|
+
Dynamic: requires-python
|
|
39
|
+
Dynamic: summary
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
Rhapso/__init__.py,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
|
|
2
|
+
Rhapso/data_prep/__init__.py,sha256=ldz-UGXfdaA5J1hyUV8ScJMqbuWxRK6UB727CbV-puQ,88
|
|
3
|
+
Rhapso/data_prep/n5_reader.py,sha256=Uzp3oeT0lymDNllK5gk3S2PrQRNGsPOndqVmLVoooEU,6919
|
|
4
|
+
Rhapso/data_prep/s3_big_stitcher_reader.py,sha256=nf5egchffBFijMMfI7WqW8_wOsMScH9yOj5rYKiU-eg,2121
|
|
5
|
+
Rhapso/data_prep/xml_to_dataframe.py,sha256=Q1iTGYcW_Zb4OH2wtMYX4uD2XrFL_9g3jHh2zJs0rSk,8153
|
|
6
|
+
Rhapso/detection/__init__.py,sha256=rP0Kry5XdHB0EtrSQDt2fo6r2n4EFbeih9effZvlWb8,167
|
|
7
|
+
Rhapso/detection/advanced_refinement.py,sha256=rNbZuesdBMyCHWna5_m4ha3BzriwVG2_p5G3_ufIUbw,7772
|
|
8
|
+
Rhapso/detection/difference_of_gaussian.py,sha256=llHOpDHH2LeL_J2Nl8ZBmshrCCtmrqXo2YHEeAS6BkY,11698
|
|
9
|
+
Rhapso/detection/image_reader.py,sha256=wqSNl02I4P8nbVSinKneZrKuBkdoFjp4GcVR3Nzc1JI,3340
|
|
10
|
+
Rhapso/detection/metadata_builder.py,sha256=EGW5E0lFB20Jz3Su6ScY-igyJcyJt0SVd_9cvYyi3bY,5339
|
|
11
|
+
Rhapso/detection/overlap_detection.py,sha256=NPcjg0CGbrHeSCR6Fg-qcjPbyExSThN-Hc_pRQc-0V0,11885
|
|
12
|
+
Rhapso/detection/points_validation.py,sha256=_wNE6TBDhpNlOk3flxjybeOu9-d-uqqIMtqjSxwwAtY,2011
|
|
13
|
+
Rhapso/detection/save_interest_points.py,sha256=kXDfnlHwSLcd2Yxlqg18ykdMyUAT77YCSHzKJyyXD8k,10522
|
|
14
|
+
Rhapso/detection/view_transform_models.py,sha256=8Oj7lpNt_ecx9lkCdVvVvysVdF8vofMaIo1et5cJ5GI,2785
|
|
15
|
+
Rhapso/fusion/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
|
+
Rhapso/fusion/affine_fusion_worker.py,sha256=IIZHokN96KaTdGnxYba_XPWRQHN6703hKK0WT_ZJFNc,9203
|
|
17
|
+
Rhapso/fusion/multiscale_worker.py,sha256=FPBJC2Tp7p5zgHEZUEdc1IgHlcvFlgHtZW9F2A_zpxw,3863
|
|
18
|
+
Rhapso/fusion/neuroglancer_link_gen_worker.py,sha256=XFd72Y3i8cklUxwuikmrVAkZ_05pZoKel2sPYxo9510,837
|
|
19
|
+
Rhapso/fusion/affine_fusion/__init__.py,sha256=tvW9OFX7P8suEPAMnZOtzHRI2Pf-ElzKzlFZ15diIA0,41
|
|
20
|
+
Rhapso/fusion/affine_fusion/blend.py,sha256=ykt773vF9KPP2Au_ZbgaCJGwakR1C5AxQ0RS0rWAw0M,9409
|
|
21
|
+
Rhapso/fusion/affine_fusion/fusion.py,sha256=Kk3cTOdxAWsWmMUAV327pO38AJl8m_jEcUqqRfzgfGM,21134
|
|
22
|
+
Rhapso/fusion/affine_fusion/geometry.py,sha256=QrILSQEbOFOXq_9KQNV0vb6TC29vh1wa4UJTJayT5ZM,4550
|
|
23
|
+
Rhapso/fusion/affine_fusion/io.py,sha256=b-5GP-8Zj2bVnHAAQ3oaGw_F66QU3Up4_hCGr2J4me0,18277
|
|
24
|
+
Rhapso/fusion/affine_fusion/script_utils.py,sha256=uow456hv77sTs_Ew3fEZ822hcDcKsmTLxDNa84en5Sc,2851
|
|
25
|
+
Rhapso/fusion/affine_fusion/setup.py,sha256=73sjw0aMgTBIPNdXjBTpd7ObNy_QiPDhY7R74ZbRKR4,69
|
|
26
|
+
Rhapso/fusion/multiscale/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
27
|
+
Rhapso/fusion/multiscale/aind_hcr_data_transformation/__init__.py,sha256=Yb6X4qnetpp2ggJLG2MVA6L6dXNbVl_goOdvSOYszo0,537
|
|
28
|
+
Rhapso/fusion/multiscale/aind_hcr_data_transformation/models.py,sha256=nf8U0lhxrSZQP2lwY0lPh6UDXFRQ_w4NzSu7cIRQ6j4,2626
|
|
29
|
+
Rhapso/fusion/multiscale/aind_hcr_data_transformation/zeiss_job.py,sha256=ZZqpwBX8pDvtyAqz_UG2wkLxuJcorhozEPJeHmgFN7w,8390
|
|
30
|
+
Rhapso/fusion/multiscale/aind_hcr_data_transformation/compress/__init__.py,sha256=Tf4tumiwz6pCubWQDb5fjdmhAbkP3UmDo1X_oLzF6yU,24
|
|
31
|
+
Rhapso/fusion/multiscale/aind_hcr_data_transformation/compress/czi_to_zarr.py,sha256=g50cvJP6L5Onm_1QBg1bJj6nPb4hv58NFHwT81ApOHg,21184
|
|
32
|
+
Rhapso/fusion/multiscale/aind_hcr_data_transformation/compress/zarr_writer.py,sha256=g2MXlctqJ3wE5eu2fO-nRoMxZ1JR-BsR-mr6jb4nR0E,9085
|
|
33
|
+
Rhapso/fusion/multiscale/aind_hcr_data_transformation/utils/__init__.py,sha256=Gkfx6bxLnyIb-DlAe7u5qJjNP-B7YK2EP3iyp0p47qI,23
|
|
34
|
+
Rhapso/fusion/multiscale/aind_hcr_data_transformation/utils/utils.py,sha256=25K_YGZs__BK3_v3TZWi-RmW0QcShaA0K7esehgz4kQ,12346
|
|
35
|
+
Rhapso/fusion/multiscale/aind_z1_radial_correction/__init__.py,sha256=Pk1OM1XvWdWOCl-DkHWElgtbWgn2549-tl4bx-k7vk0,704
|
|
36
|
+
Rhapso/fusion/multiscale/aind_z1_radial_correction/array_to_zarr.py,sha256=xco-JZ67tiL0NjuP9tv14BsTLJV0lk3hqHXn-gU1DDs,7998
|
|
37
|
+
Rhapso/fusion/multiscale/aind_z1_radial_correction/radial_correction.py,sha256=zFY6O9Ppr51ca1aUL2Xouo4j3U1KgZBaz_AyN8GpP8k,15848
|
|
38
|
+
Rhapso/fusion/multiscale/aind_z1_radial_correction/run_capsule.py,sha256=axFE8UpXCvpngvfatqkDhRYyh9mHfmHQfJNjHdoTcr4,2976
|
|
39
|
+
Rhapso/fusion/multiscale/aind_z1_radial_correction/worker.py,sha256=ctuhy8yjoH0TIsjsHbRp44H5WIVbkcII5izYRtNNQdc,2936
|
|
40
|
+
Rhapso/fusion/multiscale/aind_z1_radial_correction/utils/__init__.py,sha256=4NQEfIxBMzJOF0UQtMi77yzyp5ZwfzIXeTbpYR5SCzw,26
|
|
41
|
+
Rhapso/fusion/multiscale/aind_z1_radial_correction/utils/utils.py,sha256=ObD5bW7AIgHiHp8q8x8Sy9d67DnRNX0gD6ZnfK_QYyc,6584
|
|
42
|
+
Rhapso/fusion/neuroglancer_link_gen/__init__.py,sha256=DRVj3_OdEANkoHhc0sT9oQELsM6xzvGUSFhB-MMQ7Fw,170
|
|
43
|
+
Rhapso/fusion/neuroglancer_link_gen/dispim_link.py,sha256=i_eNlJ29FOHWcjPUol09vsDYKq1xon4dh4WFx3YlPIg,7144
|
|
44
|
+
Rhapso/fusion/neuroglancer_link_gen/exaspim_link.py,sha256=MZlbN2UAR4w6WdMCms2ZFvoFEQWn-uUgyKz7WbGMdEs,4000
|
|
45
|
+
Rhapso/fusion/neuroglancer_link_gen/hcr_link.py,sha256=WxiN-HETBuk0So7WNavmO8Lr78cHZqxkIroxSoA4hZU,13217
|
|
46
|
+
Rhapso/fusion/neuroglancer_link_gen/iSPIM_top.py,sha256=_3IgMwQ-GpfWeNLayqP-wssM4sAWp2wMRMH2EIPhQ0k,957
|
|
47
|
+
Rhapso/fusion/neuroglancer_link_gen/link_utils.py,sha256=Guab8FyG6KiIVvHdeFknrPejFYpAOrXVzJHPeER9V3o,6394
|
|
48
|
+
Rhapso/fusion/neuroglancer_link_gen/main.py,sha256=ODhbNo2qGsqjhM5EvuZUiqF3tYFhRN_uwUZe828lUHs,12335
|
|
49
|
+
Rhapso/fusion/neuroglancer_link_gen/ng_layer.py,sha256=cVeDWe342rAnOnRVowbNMD5LQQA4foR8mL44Ip22kwk,43058
|
|
50
|
+
Rhapso/fusion/neuroglancer_link_gen/ng_state.py,sha256=OI9H8GEaxvz6xJZLHn9sIC1w-nMwMmAH1_c4RDg9Ysc,36107
|
|
51
|
+
Rhapso/fusion/neuroglancer_link_gen/parsers.py,sha256=n1GkI_jtcej-yY6srXeDXAcZlkBm4VZD7CfenEM4Zz0,9967
|
|
52
|
+
Rhapso/fusion/neuroglancer_link_gen/raw_link.py,sha256=bkGOOJ2TrFhkNonQWKqgKW9X59h0SB5jSTmFxebIDU0,3670
|
|
53
|
+
Rhapso/fusion/neuroglancer_link_gen/utils/__init__.py,sha256=srOd2pB-zLJNoCgQj3Fzlr9f0TWcNgjlLr7-Fl1HyLg,61
|
|
54
|
+
Rhapso/fusion/neuroglancer_link_gen/utils/shader_utils.py,sha256=9LxpktcmN9UdYfJa15LQcyd2SSprAF8fAs6g_nIH2eU,2322
|
|
55
|
+
Rhapso/fusion/neuroglancer_link_gen/utils/transfer.py,sha256=8hFBM8lmCV3TsEEVXZk1iZeZ2sYHO_KUaZNRm8XjOOo,1173
|
|
56
|
+
Rhapso/fusion/neuroglancer_link_gen/utils/utils.py,sha256=Q0jKPGI39ScCHDgVEoWbrZrBrEluCjm69z28T3JScTc,7322
|
|
57
|
+
Rhapso/matching/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
58
|
+
Rhapso/matching/load_and_transform_points.py,sha256=UEV9gnWyl2z4zAUR2Z_ewX1_TWoS-IpXPL-qRB1_Ms8,16416
|
|
59
|
+
Rhapso/matching/ransac_matching.py,sha256=PH9JpWqCrWcZoDvwG_Zs2FSk2cCdIX9be_6y2ix-3RI,20031
|
|
60
|
+
Rhapso/matching/save_matches.py,sha256=OYHzzGoF9-PTVfQZBJ7HaJ9JYB_Q8ZazH-f3HljxzLQ,4720
|
|
61
|
+
Rhapso/matching/xml_parser.py,sha256=nP_jA_jEfAFPzt6Al91NpwWEk-Klk8P5QzNINJYVksU,11527
|
|
62
|
+
Rhapso/pipelines/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
63
|
+
Rhapso/pipelines/ray/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
64
|
+
Rhapso/pipelines/ray/evaluation.py,sha256=k05e72WKu9UkptJkjk_rkScjn1zGOhIG1rTOLkxkOLI,2610
|
|
65
|
+
Rhapso/pipelines/ray/interest_point_detection.py,sha256=NZ2Egm81KPC1dFncz_6srW0TYhBTpKqy80nEk0DigEU,6595
|
|
66
|
+
Rhapso/pipelines/ray/interest_point_matching.py,sha256=aM-83D3JJUrkiWT0hogpcyxUw7h78kKegYtUFKMQu3s,5697
|
|
67
|
+
Rhapso/pipelines/ray/matching_stats.py,sha256=7NZ4rQPTKMwzJBrPXkVbiWkzIeH4h9PfDozqrUo8TKU,4199
|
|
68
|
+
Rhapso/pipelines/ray/solver.py,sha256=JqNZPyd_0tliM3mu8voDNcQuhkgwMKF5fBMzfjVMCy8,6198
|
|
69
|
+
Rhapso/pipelines/ray/split_dataset.py,sha256=JVMd3qYw17Em-rQDvufSAaqaPWw5kf9yWpf5ShSh97M,2943
|
|
70
|
+
Rhapso/pipelines/ray/aws/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
71
|
+
Rhapso/pipelines/ray/aws/alignment_pipeline.py,sha256=JvSB08mIskgqzc-U-6vOprl5k7i9UN5yOgDOKtimIJ0,9716
|
|
72
|
+
Rhapso/pipelines/ray/aws/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
73
|
+
Rhapso/pipelines/ray/local/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
74
|
+
Rhapso/pipelines/ray/local/alignment_pipeline.py,sha256=OFdns9kILtAQD8KNU7MoLXQeZba1q4YV9LiLVSo8fi0,6712
|
|
75
|
+
Rhapso/pipelines/ray/param/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
76
|
+
Rhapso/solver/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
77
|
+
Rhapso/solver/compute_tiles.py,sha256=-7QFrZZfh1iW1nDdlBORlcqOGf7urJmgjWOj6DfDdHQ,20471
|
|
78
|
+
Rhapso/solver/concatenate_models.py,sha256=-763cwYyyHM6b7E5RkHMRtykFrVjeVeB1l0jFeoLfnI,4472
|
|
79
|
+
Rhapso/solver/connected_graphs.py,sha256=wKxOOKRNd4MctYRX677hiFIYHLAg3GinkpqDqO0ad50,3603
|
|
80
|
+
Rhapso/solver/data_prep.py,sha256=nS96_4MJ0TcHyFMsGDS82n0R-aUm8J99g8d_MrWpsik,7753
|
|
81
|
+
Rhapso/solver/global_optimization.py,sha256=6qYXHmJRCTf-4gSwFgmy9IBUBUp7SuL1kMOER8cTx6A,13614
|
|
82
|
+
Rhapso/solver/model_and_tile_setup.py,sha256=WqCK9_sSMJ5MFmvIYi1_x1Sx_9giYORpCfcirZsMNOI,4889
|
|
83
|
+
Rhapso/solver/pre_align_tiles.py,sha256=BccXMr5cZILM8U0ZzhUyflQYx_WUQzvNDdX-S_u4Roo,11100
|
|
84
|
+
Rhapso/solver/save_results.py,sha256=dIkQ3SiGNlKx5z-6k_o_O4WjANxKYLJQ059URnuxVJw,3985
|
|
85
|
+
Rhapso/solver/view_transforms.py,sha256=JEeAyC4LXtsJrzNjegnw_AwNUIfZFw30vvHa0TnZocw,3024
|
|
86
|
+
Rhapso/solver/xml_to_dataframe_solver.py,sha256=u96DPnZNDa-TgimsPqyZlIvHk4A1e8yZsNwzM8ctdGE,7848
|
|
87
|
+
Rhapso/split_dataset/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
88
|
+
Rhapso/split_dataset/compute_grid_rules.py,sha256=dCAuNs4D7SaCfTXp54lchgttZVSgLH5f1tQWtkwr_ws,3028
|
|
89
|
+
Rhapso/split_dataset/save_points.py,sha256=k-jH-slmxkbrxDl-uJvDkwOedi6cg7md3kg_a0NdL24,3713
|
|
90
|
+
Rhapso/split_dataset/save_xml.py,sha256=Iq1UdFa8sdnWGygfIpDi4F5In-SCWggpl7lnuDTxkHE,14280
|
|
91
|
+
Rhapso/split_dataset/split_images.py,sha256=2RzAi0btV1tmh4le9QotRif1IYUU6_4pLcGGpFBM9zk,22434
|
|
92
|
+
Rhapso/split_dataset/xml_to_dataframe_split.py,sha256=ByaLzJ4sqT417UiCQU31_CS_V4Jms7pjMbBl0ZdSNNA,8570
|
|
93
|
+
rhapso-0.1.92.dist-info/licenses/LICENSE,sha256=U0Y7B3gZJHXpjJVLgTQjM8e_c8w4JJpLgGhIdsoFR1Y,1092
|
|
94
|
+
tests/__init__.py,sha256=LYf6ZGyYRcduFFSaOLmnw3rTyfS3XLib0dsTHDWH0jo,37
|
|
95
|
+
tests/test_detection.py,sha256=NtFYR_du9cbKrclQcNiJYsKzyqly6ivF61pw6_NICcM,440
|
|
96
|
+
tests/test_matching.py,sha256=QX0ekSdyIkPpAsXHfSMqJUUlNZg09caSlhhUM63MduM,697
|
|
97
|
+
tests/test_solving.py,sha256=t8I9XPV_4ZFM-DJpgvdYXxkG2_4DQgqs-FFyE5w8Nfg,695
|
|
98
|
+
rhapso-0.1.92.dist-info/METADATA,sha256=ZcBZ0BjZxEyzWTv8K3WhzF5McBOpBmPVNePX3VM2bgQ,1300
|
|
99
|
+
rhapso-0.1.92.dist-info/WHEEL,sha256=SmOxYU7pzNKBqASvQJ7DjX3XGUF92lrGhMb3R6_iiqI,91
|
|
100
|
+
rhapso-0.1.92.dist-info/top_level.txt,sha256=NXvsrsTfdowWbM7MxEjkDZE2Jo74lmq7ruWkp70JjSw,13
|
|
101
|
+
rhapso-0.1.92.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022 Allen Institute for Neural Dynamics
|
|
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.
|
tests/__init__.py
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Empty init file for tests package
|
tests/test_detection.py
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import unittest
|
|
2
|
+
from Rhapso.detection.difference_of_gaussian import DifferenceOfGaussian
|
|
3
|
+
|
|
4
|
+
class TestDetection(unittest.TestCase):
|
|
5
|
+
def test_main(self):
|
|
6
|
+
# Simulate arguments
|
|
7
|
+
class Args:
|
|
8
|
+
medianFilter = 10
|
|
9
|
+
sigma = 1.8
|
|
10
|
+
threshold = 0.05
|
|
11
|
+
|
|
12
|
+
args = Args()
|
|
13
|
+
DifferenceOfGaussian(args)
|
|
14
|
+
self.assertTrue(True)
|
|
15
|
+
|
|
16
|
+
if __name__ == '__main__':
|
|
17
|
+
unittest.main()
|
tests/test_matching.py
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import unittest
|
|
2
|
+
from unittest.mock import patch
|
|
3
|
+
import argparse
|
|
4
|
+
from Rhapso.matching.feature_matching import main
|
|
5
|
+
|
|
6
|
+
class TestMatching(unittest.TestCase):
|
|
7
|
+
@patch("builtins.print")
|
|
8
|
+
def test_match_features(self, mock_print):
|
|
9
|
+
args = argparse.Namespace(
|
|
10
|
+
method="ORB",
|
|
11
|
+
distance=0.7,
|
|
12
|
+
verbose=True
|
|
13
|
+
)
|
|
14
|
+
main(args)
|
|
15
|
+
mock_print.assert_any_call("Feature Matching Running with the following arguments:")
|
|
16
|
+
mock_print.assert_any_call("Method: ORB")
|
|
17
|
+
mock_print.assert_any_call("Distance Threshold: 0.7")
|
|
18
|
+
mock_print.assert_any_call("Verbose: True")
|
|
19
|
+
|
|
20
|
+
if __name__ == "__main__":
|
|
21
|
+
unittest.main()
|
tests/test_solving.py
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import unittest
|
|
2
|
+
from unittest.mock import patch
|
|
3
|
+
import argparse
|
|
4
|
+
from Rhapso.solver.solver import main
|
|
5
|
+
|
|
6
|
+
class TestSolving(unittest.TestCase):
|
|
7
|
+
@patch("builtins.print")
|
|
8
|
+
def test_solve_transformation(self, mock_print):
|
|
9
|
+
args = argparse.Namespace(
|
|
10
|
+
method="Affine",
|
|
11
|
+
iterations=50,
|
|
12
|
+
tolerance=0.0005
|
|
13
|
+
)
|
|
14
|
+
main(args)
|
|
15
|
+
mock_print.assert_any_call("Solving Transformations with the following arguments:")
|
|
16
|
+
mock_print.assert_any_call("Method: Affine")
|
|
17
|
+
mock_print.assert_any_call("Iterations: 50")
|
|
18
|
+
mock_print.assert_any_call("Tolerance: 0.0005")
|
|
19
|
+
|
|
20
|
+
if __name__ == "__main__":
|
|
21
|
+
unittest.main()
|