Rhapso 0.2.1__py3-none-any.whl → 0.2.2__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.
@@ -271,7 +271,7 @@ class RansacMatching:
271
271
  for b in range(1):
272
272
 
273
273
  matches = []
274
- for i in range(3):
274
+ for i in range(self.num_required_neighbors):
275
275
  point_match = (desc_a['relative_descriptors'][i], desc_b['relative_descriptors'][i])
276
276
  matches.append(point_match)
277
277
 
@@ -9,7 +9,7 @@ import ray
9
9
  ray.init()
10
10
 
11
11
  # Point to param file
12
- with open("Rhapso/pipelines/ray/param/exaSPIM_802450.yml", "r") as file:
12
+ with open("Rhapso/pipelines/ray/param/exaSPIM_794495.yml", "r") as file:
13
13
  config = yaml.safe_load(file)
14
14
 
15
15
  # -- INITIALIZE EACH COMPONENT --
@@ -13,13 +13,6 @@ class SaveXML:
13
13
  self.xml_output_path = xml_output_path
14
14
 
15
15
  def save_tile_attributes_to_xml(self, xml):
16
- """
17
- Ensure the *last* <ViewSetups> (the outer split one) has:
18
- - <Attributes name="illumination"> old_tile_0..N </Attributes>
19
- - <Attributes name="channel"> ... </Attributes>
20
- - <Attributes name="tile"> with locations from Image Splitting </Attributes>
21
- - <Attributes name="angle"><Angle id=0 name=0/></Attributes>
22
- """
23
16
  root = ET.fromstring(xml)
24
17
 
25
18
  def tagname(el):
@@ -249,26 +242,6 @@ class SaveXML:
249
242
  """
250
243
  Wrap the top-level ImageLoader in <ImageLoader format="split.viewerimgloader">
251
244
  and move the ORIGINAL ViewSetups/Timepoints/MissingViews into an inner
252
- <SequenceDescription> inside that wrapper.
253
-
254
- Resulting structure:
255
-
256
- <SpimData>
257
- <BasePath/>
258
- <SequenceDescription>
259
- <ImageLoader format="split.viewerimgloader">
260
- <ImageLoader format="bdv.multimg.zarr"> ... </ImageLoader>
261
- <SequenceDescription>
262
- <ViewSetups> (ORIGINAL) </ViewSetups>
263
- <Timepoints> (ORIGINAL) </Timepoints>
264
- <MissingViews/>
265
- </SequenceDescription>
266
- <!-- SetupIds (for split tiles) will be added later -->
267
- </ImageLoader>
268
- <!-- NEW ViewSetups/Timepoints/MissingViews for split views are added later -->
269
- </SequenceDescription>
270
- <ViewRegistrations> ... </ViewRegistrations>
271
- </SpimData>
272
245
  """
273
246
  root = ET.fromstring(xml)
274
247
 
@@ -309,8 +282,6 @@ class SaveXML:
309
282
  if fmt == 'split.viewerimgloader':
310
283
  return xml
311
284
 
312
- # Collect any other ImageLoader siblings (other sources)
313
- other_imageloaders = []
314
285
  # Collect ORIGINAL ViewSetups / Timepoints / MissingViews that are siblings
315
286
  orig_viewsetups = None
316
287
  orig_timepoints = None
@@ -318,18 +289,15 @@ class SaveXML:
318
289
 
319
290
  for ch in children[base_loader_idx + 1:]:
320
291
  name = tn(ch)
321
- if name == 'ImageLoader':
322
- other_imageloaders.append(ch)
323
- elif name == 'ViewSetups':
292
+ if name == 'ViewSetups':
324
293
  orig_viewsetups = ch
325
294
  elif name == 'Timepoints':
326
295
  orig_timepoints = ch
327
296
  elif name == 'MissingViews':
328
297
  orig_missingviews = ch
329
-
330
298
 
331
299
  # Remove them from the outer SequenceDescription
332
- for node in (orig_viewsetups, orig_timepoints, orig_missingviews, *other_imageloaders):
300
+ for node in (orig_viewsetups, orig_timepoints, orig_missingviews):
333
301
  if node is not None and node in seq:
334
302
  seq.remove(node)
335
303
 
@@ -340,12 +308,9 @@ class SaveXML:
340
308
  wrapper = ET.Element('ImageLoader', {'format': 'split.viewerimgloader'})
341
309
  # First child: original loader
342
310
  wrapper.append(base_loader)
343
- for other_loader in other_imageloaders:
344
- wrapper.append(other_loader)
345
311
 
346
312
  # Inner <SequenceDescription> that holds the original ViewSetups/Timepoints/MissingViews
347
313
  inner_seq = ET.Element('SequenceDescription')
348
-
349
314
  if orig_viewsetups is not None:
350
315
  inner_seq.append(orig_viewsetups)
351
316
  if orig_timepoints is not None:
@@ -516,33 +481,6 @@ class SaveXML:
516
481
  return ET.tostring(root, encoding='unicode')
517
482
 
518
483
  def save_setup_id_to_xml(self, xml):
519
- """
520
- Create/overwrite the OUTER <ViewSetups> (split tiles) and ensure outer
521
- <Timepoints> and <MissingViews> exist under the top-level SequenceDescription.
522
-
523
- Outer layout target:
524
-
525
- <SpimData>
526
- <BasePath/>
527
- <SequenceDescription>
528
- <ImageLoader format="split.viewerimgloader">
529
- ...
530
- <SequenceDescription> (original) </SequenceDescription>
531
- <SetupIds> ... </SetupIds> (from save_setup_id_definition_to_xml)
532
- </ImageLoader>
533
- <ViewSetups> <-- created here (ids 0..499)
534
- <ViewSetup>...</ViewSetup>
535
- ...
536
- <Attributes ...>...</Attributes>
537
- </ViewSetups>
538
- <Timepoints type="pattern">
539
- <integerpattern>0</integerpattern>
540
- </Timepoints>
541
- <MissingViews/>
542
- </SequenceDescription>
543
- <ViewRegistrations>...</ViewRegistrations>
544
- </SpimData>
545
- """
546
484
  root = ET.fromstring(xml)
547
485
 
548
486
  def tn(el):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Rhapso
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: A python package for aligning and stitching light sheet fluorescence microscopy images
5
5
  Author: ND
6
6
  Author-email: sean.fite@alleninstitute.org
@@ -56,7 +56,7 @@ Rhapso/fusion/neuroglancer_link_gen/utils/transfer.py,sha256=8hFBM8lmCV3TsEEVXZk
56
56
  Rhapso/fusion/neuroglancer_link_gen/utils/utils.py,sha256=Q0jKPGI39ScCHDgVEoWbrZrBrEluCjm69z28T3JScTc,7322
57
57
  Rhapso/matching/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
58
58
  Rhapso/matching/load_and_transform_points.py,sha256=UEV9gnWyl2z4zAUR2Z_ewX1_TWoS-IpXPL-qRB1_Ms8,16416
59
- Rhapso/matching/ransac_matching.py,sha256=BWSRmckG2GiA49RuGnja4le-Xo5o9aY53Yawes9P-_E,20268
59
+ Rhapso/matching/ransac_matching.py,sha256=H5El2x-sw2snbOZVsbmo2fX-F3i9g3Xd-nNz1Z2UT48,20294
60
60
  Rhapso/matching/save_matches.py,sha256=OYHzzGoF9-PTVfQZBJ7HaJ9JYB_Q8ZazH-f3HljxzLQ,4720
61
61
  Rhapso/matching/xml_parser.py,sha256=nP_jA_jEfAFPzt6Al91NpwWEk-Klk8P5QzNINJYVksU,11527
62
62
  Rhapso/pipelines/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -71,7 +71,7 @@ Rhapso/pipelines/ray/aws/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZ
71
71
  Rhapso/pipelines/ray/aws/alignment_pipeline.py,sha256=c_UUw_90xnoAJ5zYuU5OD0Uzr1cPOqsZ6aXHOQauYCI,10015
72
72
  Rhapso/pipelines/ray/aws/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
73
73
  Rhapso/pipelines/ray/local/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
74
- Rhapso/pipelines/ray/local/alignment_pipeline.py,sha256=EV2e0Kfx7uSHaIVMTKId-NG8f6B4TCWnI5yqSRrmuFE,6989
74
+ Rhapso/pipelines/ray/local/alignment_pipeline.py,sha256=lhk9Xx8d3wQctxi834OlB8vQelwvVCqs-WKKQxtEVtU,6989
75
75
  Rhapso/pipelines/ray/param/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
76
76
  Rhapso/solver/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
77
77
  Rhapso/solver/compute_tiles.py,sha256=-7QFrZZfh1iW1nDdlBORlcqOGf7urJmgjWOj6DfDdHQ,20471
@@ -87,15 +87,15 @@ Rhapso/solver/xml_to_dataframe_solver.py,sha256=u96DPnZNDa-TgimsPqyZlIvHk4A1e8yZ
87
87
  Rhapso/split_dataset/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
88
88
  Rhapso/split_dataset/compute_grid_rules.py,sha256=dCAuNs4D7SaCfTXp54lchgttZVSgLH5f1tQWtkwr_ws,3028
89
89
  Rhapso/split_dataset/save_points.py,sha256=k-jH-slmxkbrxDl-uJvDkwOedi6cg7md3kg_a0NdL24,3713
90
- Rhapso/split_dataset/save_xml.py,sha256=55NdzfHPGAhpR1QYaDwXPZQlZlP6T9fymhJaOwTuZh0,29561
90
+ Rhapso/split_dataset/save_xml.py,sha256=iVH8aEffD6ya15CIugAb9kiJsz5GTo0HKu_xz3jbnrk,27082
91
91
  Rhapso/split_dataset/split_images.py,sha256=2RzAi0btV1tmh4le9QotRif1IYUU6_4pLcGGpFBM9zk,22434
92
92
  Rhapso/split_dataset/xml_to_dataframe_split.py,sha256=ByaLzJ4sqT417UiCQU31_CS_V4Jms7pjMbBl0ZdSNNA,8570
93
- rhapso-0.2.1.dist-info/licenses/LICENSE,sha256=U0Y7B3gZJHXpjJVLgTQjM8e_c8w4JJpLgGhIdsoFR1Y,1092
93
+ rhapso-0.2.2.dist-info/licenses/LICENSE,sha256=U0Y7B3gZJHXpjJVLgTQjM8e_c8w4JJpLgGhIdsoFR1Y,1092
94
94
  tests/__init__.py,sha256=LYf6ZGyYRcduFFSaOLmnw3rTyfS3XLib0dsTHDWH0jo,37
95
95
  tests/test_detection.py,sha256=NtFYR_du9cbKrclQcNiJYsKzyqly6ivF61pw6_NICcM,440
96
96
  tests/test_matching.py,sha256=QX0ekSdyIkPpAsXHfSMqJUUlNZg09caSlhhUM63MduM,697
97
97
  tests/test_solving.py,sha256=t8I9XPV_4ZFM-DJpgvdYXxkG2_4DQgqs-FFyE5w8Nfg,695
98
- rhapso-0.2.1.dist-info/METADATA,sha256=v-Js1TXvjPcxVZMwtBGL0n-9bTy69N2kbcCobgzAHTM,19319
99
- rhapso-0.2.1.dist-info/WHEEL,sha256=SmOxYU7pzNKBqASvQJ7DjX3XGUF92lrGhMb3R6_iiqI,91
100
- rhapso-0.2.1.dist-info/top_level.txt,sha256=NXvsrsTfdowWbM7MxEjkDZE2Jo74lmq7ruWkp70JjSw,13
101
- rhapso-0.2.1.dist-info/RECORD,,
98
+ rhapso-0.2.2.dist-info/METADATA,sha256=aURyGl1kXMhJZ8bQg5BIoS3wLMy2nHX-6NOcYjbXajg,19319
99
+ rhapso-0.2.2.dist-info/WHEEL,sha256=SmOxYU7pzNKBqASvQJ7DjX3XGUF92lrGhMb3R6_iiqI,91
100
+ rhapso-0.2.2.dist-info/top_level.txt,sha256=NXvsrsTfdowWbM7MxEjkDZE2Jo74lmq7ruWkp70JjSw,13
101
+ rhapso-0.2.2.dist-info/RECORD,,
File without changes