batoolset 0.1.4__tar.gz → 0.1.6__tar.gz
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.
- {batoolset-0.1.4 → batoolset-0.1.6}/PKG-INFO +1 -1
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/draw/shapes/group.py +9 -5
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/draw/shapes/image2d.py +9 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/images/centralstore.py +0 -2
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/version.py +1 -1
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset.egg-info/PKG-INFO +1 -1
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset.egg-info/SOURCES.txt +0 -1
- batoolset-0.1.4/batoolset/zarr/centralstorezarrstore.py +0 -108
- {batoolset-0.1.4 → batoolset-0.1.6}/LICENSE +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/README.md +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/GUI/__init__.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/GUI/list_gui.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/GUI/multi_image_display.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/GUI/open.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/GUI/overlay_hints.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/GUI/paint2.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/GUI/scrollablepaint.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/IJ_ROIs/__init__.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/IJ_ROIs/tools.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/PATH/__init__.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/PATH/tools.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/SQLite_tools/__init__.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/SQLite_tools/tools.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/__init__.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/binary/__init__.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/binary/tools.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/binarytools/__init__.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/binarytools/cell_center_detector.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/clipboard_tools/__init__.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/clipboard_tools/tools.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/colors/__init__.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/colors/colorgen.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/colors/tools.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/command_line/__init__.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/command_line/tools.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/dialogs/__init__.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/dialogs/opensave.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/dicts/__init__.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/dicts/tools.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/dims/__init__.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/dims/tools.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/draw/__init__.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/draw/shapes/Position.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/draw/shapes/__init__.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/draw/shapes/automated_alignment_drawing_refactored.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/draw/shapes/circle2d.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/draw/shapes/compute_optimal_size_all_merged.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/draw/shapes/ellipse2d.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/draw/shapes/freehand2d.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/draw/shapes/line2d.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/draw/shapes/point2d.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/draw/shapes/polygon2d.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/draw/shapes/polyline2d.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/draw/shapes/rect2d.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/draw/shapes/rectangle2d.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/draw/shapes/scalebar.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/draw/shapes/serializablefont.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/draw/shapes/serializableguiparams.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/draw/shapes/square2d.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/draw/shapes/textorientation.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/draw/shapes/tools.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/draw/shapes/transform2D.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/draw/shapes/txt2d.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/draw/widgets/__init__.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/draw/widgets/col.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/draw/widgets/image_group.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/draw/widgets/image_organizer.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/draw/widgets/paint.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/draw/widgets/vectorial.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/figure/__init__.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/figure/alignment.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/figure/column.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/figure/fig_tools.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/figure/minimal_debugger_scale_etc.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/figure/panel.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/figure/row.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/figure/user_selection.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/files/__init__.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/files/tools.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/images/__init__.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/images/tools.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/img.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/linux/__init__.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/linux/tools.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/lists/__init__.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/lists/tools.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/luts/__init__.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/luts/lut_minimal_test.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/matplolib/__init__.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/matplolib/tools.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/np_tools/__init__.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/np_tools/tools.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/np_tools/trash.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/pandas_tools/__init__.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/pandas_tools/tools.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/partials/__init__.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/partials/tools.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/plot_tools/__init__.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/plot_tools/tools.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/pyqt/__init__.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/pyqt/pleasewaitdialog.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/pyqt/tools.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/re_tools/__init__.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/re_tools/tools.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/serialization/__init__.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/serialization/tools.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/sets/__init__.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/sets/tools.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/settings/__init__.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/settings/global_settings.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/strings/__init__.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/strings/tools.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/ta/__init__.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/ta/database/__init__.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/ta/database/advanced_sql_plotter.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/ta/database/my_qt_table.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/ta/database/preview_and_edit_sqlite_db.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/ta/database/sql.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/ta/database/sql_column_name_dialog.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/ta/measurements/TAmeasures.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/ta/measurements/__init__.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/ta/measurements/measurements3D/__init__.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/ta/measurements/measurements3D/get_point_on_surface_if_centroid_is_bad.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/ta/measurements/measurements3D/height_map_to_projection.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/ta/measurements/measurements3D/measures3D.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/ta/measurements/measurements3D/triangulate.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/ta/measurements/nematic.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/ta/measurements/nematic_measurements.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/ta/segmentation/__init__.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/ta/segmentation/neo_wshed.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/ta/selections/__init__.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/ta/selections/selection.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/ta/tracking/__init__.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/ta/tracking/last_tracking_based_on_matching_or_on_translation_from_mermaid_warp.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/ta/tracking/local_to_track_correspondance.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/ta/tracking/rapid_detection_of_vertices.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/ta/tracking/registration.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/ta/tracking/swap_detector_and_fixer.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/ta/tracking/track_correction.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/ta/tracking/tracking_error_detector_and_fixer.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/ta/tracking/tracking_yet_another_approach_pyramidal_registration_n_neo_swapping_correction.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/ta/utils/TA_tools.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/ta/utils/__init__.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/ta/utils/rps_tools.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/tests/__init__.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/tests/rps_tools.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/tests/tools.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/tools/__init__.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/tools/early_stopper_class.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/tools/guided_data_recoverer.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/tools/logger.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/tools/mytimer.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/tools/prompt_color.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/tools/qthandler.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/uitools/__init__.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/uitools/blinker.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/unsafe/__init__.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/unsafe/tools.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/utils/__init__.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/utils/commontools.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/utils/loadlist.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/xml/__init__.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/xml/tools.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/zarr/__init__.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/zip_tools/__init__.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset/zip_tools/tools.py +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset.egg-info/dependency_links.txt +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset.egg-info/requires.txt +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/batoolset.egg-info/top_level.txt +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/setup.cfg +0 -0
- {batoolset-0.1.4 → batoolset-0.1.6}/setup.py +0 -0
|
@@ -317,10 +317,6 @@ class Group(Rectangle2D):
|
|
|
317
317
|
self.isText = isText # this is just for pure text groups (will have a different behaviour on double click)
|
|
318
318
|
# self.scale = 1
|
|
319
319
|
|
|
320
|
-
@classmethod
|
|
321
|
-
def reset_count(cls):
|
|
322
|
-
cls._count = 0
|
|
323
|
-
|
|
324
320
|
# List-like behavior
|
|
325
321
|
def __getitem__(self, key):
|
|
326
322
|
# print(key)
|
|
@@ -364,7 +360,7 @@ class Group(Rectangle2D):
|
|
|
364
360
|
if not self.isEmpty():
|
|
365
361
|
try:
|
|
366
362
|
# print('resizing', self, self.content)
|
|
367
|
-
set_to_size(self,self.width() if self.orientation == 'X' else self.height())
|
|
363
|
+
set_to_size(self, self.width() if self.orientation == 'X' else self.height())
|
|
368
364
|
except:
|
|
369
365
|
# print('just for info for now, comment that lines in the future')
|
|
370
366
|
traceback.print_exc()
|
|
@@ -883,6 +879,14 @@ class Group(Rectangle2D):
|
|
|
883
879
|
def __setitem__(self, index, item):
|
|
884
880
|
self.content[index] = item
|
|
885
881
|
|
|
882
|
+
def get_nested_groups(self):
|
|
883
|
+
groups = [self]
|
|
884
|
+
if self.content:
|
|
885
|
+
for group in self.content:
|
|
886
|
+
if isinstance(group, Group):
|
|
887
|
+
groups.extend(group.get_nested_groups())
|
|
888
|
+
return groups
|
|
889
|
+
|
|
886
890
|
def contains(self, *__args):
|
|
887
891
|
# hacked contains that checks whether a point or an image is contained in the stuff
|
|
888
892
|
# see for images
|
|
@@ -311,6 +311,15 @@ class Image2D(Rectangle2D):
|
|
|
311
311
|
self.px_to_unit_conversion_factor = 0
|
|
312
312
|
# print()
|
|
313
313
|
|
|
314
|
+
def get_nb_channels(self):
|
|
315
|
+
if isinstance(self.img, np.ndarray):
|
|
316
|
+
guessed_dimensions =guess_dimensions(self.img)
|
|
317
|
+
if 'c' in guessed_dimensions:
|
|
318
|
+
return self.img.shape[guessed_dimensions.index('c')]
|
|
319
|
+
else:
|
|
320
|
+
return 1
|
|
321
|
+
else:
|
|
322
|
+
return 0
|
|
314
323
|
|
|
315
324
|
def get_extra_dimensions(self, handle_proj=False):
|
|
316
325
|
if not isinstance(self.img, np.ndarray):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
__MAJOR__ = 0
|
|
2
2
|
__MINOR__ = 1
|
|
3
|
-
__MICRO__ =
|
|
3
|
+
__MICRO__ = 6
|
|
4
4
|
__RELEASE__ = '' # a #b # https://www.python.org/dev/peps/pep-0440/#public-version-identifiers --> alpha beta, ...
|
|
5
5
|
__VERSION__ = ''.join([str(__MAJOR__), '.', str(__MINOR__), '.', str(__MICRO__)])
|
|
6
6
|
__DESCRIPTION__ = """An aggregate of functions I find useful"""
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import traceback
|
|
2
|
-
import gc
|
|
3
|
-
import zarr
|
|
4
|
-
|
|
5
|
-
# from batoolset.img import Img
|
|
6
|
-
# pb the store should also store metadata -−> see how I can do that
|
|
7
|
-
|
|
8
|
-
__DEBUG__ = True
|
|
9
|
-
|
|
10
|
-
class ImageCentralStoreZarr:
|
|
11
|
-
store = None
|
|
12
|
-
|
|
13
|
-
@classmethod
|
|
14
|
-
def init(cls, folder_path=None):
|
|
15
|
-
try:
|
|
16
|
-
if folder_path is None:
|
|
17
|
-
# Create a Zarr store in memory
|
|
18
|
-
zarr_store = zarr.MemoryStore()
|
|
19
|
-
else:
|
|
20
|
-
zarr_store = zarr.DirectoryStore(folder_path) # just a single line is sufficient to handle the stuff
|
|
21
|
-
zarr_root = zarr.group(store=zarr_store)
|
|
22
|
-
cls.store = zarr_root
|
|
23
|
-
except:
|
|
24
|
-
traceback.print_exc()
|
|
25
|
-
print('Error zarr store could not be created')
|
|
26
|
-
|
|
27
|
-
@classmethod
|
|
28
|
-
def set_store(cls, store):
|
|
29
|
-
if __DEBUG__:
|
|
30
|
-
print('setting store', cls.store)
|
|
31
|
-
# Set the central store (zarr store)
|
|
32
|
-
if isinstance(store, str):
|
|
33
|
-
cls.store = zarr.open(store, mode='a')
|
|
34
|
-
else:
|
|
35
|
-
cls.store = store
|
|
36
|
-
|
|
37
|
-
@classmethod
|
|
38
|
-
def get_store(cls):
|
|
39
|
-
if __DEBUG__:
|
|
40
|
-
print('getting store', cls.store)
|
|
41
|
-
return cls.store
|
|
42
|
-
|
|
43
|
-
@classmethod
|
|
44
|
-
def append(cls, image_id, data):
|
|
45
|
-
# Save the image data to the central store
|
|
46
|
-
if cls.store is not None:
|
|
47
|
-
if data is not None:
|
|
48
|
-
cls.store[image_id] = data
|
|
49
|
-
else:
|
|
50
|
-
try:
|
|
51
|
-
if __DEBUG__:
|
|
52
|
-
print('deleting image store entry because None')
|
|
53
|
-
del cls.store[image_id]
|
|
54
|
-
except:
|
|
55
|
-
pass
|
|
56
|
-
if __DEBUG__:
|
|
57
|
-
print(f"Image {image_id} added to central store.")
|
|
58
|
-
|
|
59
|
-
if hasattr(data, 'metadata'):
|
|
60
|
-
cls.store.attrs[image_id] = data.metadata
|
|
61
|
-
else:
|
|
62
|
-
cls.store.attrs[image_id] = None # just in case there was already a metadata attribute --> make sure to have this
|
|
63
|
-
# else:
|
|
64
|
-
# if __DEBUG__:
|
|
65
|
-
# print("Central store is not set.")
|
|
66
|
-
|
|
67
|
-
@classmethod
|
|
68
|
-
def load(cls, image_id):
|
|
69
|
-
if False:
|
|
70
|
-
# shall I do gc
|
|
71
|
-
# Check if central store is available and if the image exists in the store
|
|
72
|
-
# gc.collect()
|
|
73
|
-
# Print the number of objects that were garbage collected
|
|
74
|
-
print(f"{gc.collect():,} objects were garbage collected")
|
|
75
|
-
if cls.store is not None:
|
|
76
|
-
if image_id in cls.store:
|
|
77
|
-
img = cls.store[image_id][:]
|
|
78
|
-
metadata = cls.store.attrs.get(image_id, None)
|
|
79
|
-
if __DEBUG__:
|
|
80
|
-
print(f"Image {image_id} loaded from central store.")
|
|
81
|
-
return metadata,img
|
|
82
|
-
else:
|
|
83
|
-
metadata, img = cls.reload(image_id)
|
|
84
|
-
return metadata, img
|
|
85
|
-
|
|
86
|
-
if __DEBUG__:
|
|
87
|
-
print('No store found --> skipping loading from store for', image_id)
|
|
88
|
-
return None, None
|
|
89
|
-
|
|
90
|
-
# maybe put a relaod where the image is necessarily reloaded -−> force an update of the image from source file
|
|
91
|
-
@classmethod
|
|
92
|
-
def reload(cls, image_id):
|
|
93
|
-
from batoolset.img import Img
|
|
94
|
-
if __DEBUG__:
|
|
95
|
-
print('Img called for file', image_id)
|
|
96
|
-
img = Img(image_id,
|
|
97
|
-
prefer_store_if_available=False) # pb will this launch an infinite loop -−> maybe so make sure to prevent reload form it
|
|
98
|
-
metadata = None
|
|
99
|
-
if hasattr(img, 'metadata'):
|
|
100
|
-
metadata = img.metadata
|
|
101
|
-
# add image to the store
|
|
102
|
-
cls.append(image_id, img)
|
|
103
|
-
del img
|
|
104
|
-
|
|
105
|
-
img = cls.store[image_id] # then we reload it from the store in order not to duplicate it # MEGA TODO -−> check
|
|
106
|
-
metadata = cls.store.attrs.get(image_id, None)
|
|
107
|
-
|
|
108
|
-
return metadata, img
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{batoolset-0.1.4 → batoolset-0.1.6}/batoolset/draw/shapes/automated_alignment_drawing_refactored.py
RENAMED
|
File without changes
|
|
File without changes
|
{batoolset-0.1.4 → batoolset-0.1.6}/batoolset/draw/shapes/compute_optimal_size_all_merged.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{batoolset-0.1.4 → batoolset-0.1.6}/batoolset/ta/tracking/tracking_error_detector_and_fixer.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|