fspi-analysis 0.2.1__tar.gz → 0.2.2__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fspi_analysis
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: A simple plugin to perform fspi analysis within napari
5
5
  Author: Olivier Cahn
6
6
  Author-email: oc124@ic.ac.uk
@@ -1,4 +1,4 @@
1
- __version__ = "0.2.1"
1
+ __version__ = "0.2.2"
2
2
 
3
3
  # src/fspi_analysis/__init__.py
4
4
 
@@ -75,8 +75,8 @@ class ImageAnalysisApp:
75
75
  self.apply_threshold_button = PushButton(text="Apply Threshold")
76
76
 
77
77
  # Output controls
78
- self.real_core_size_widget = FloatSpinBox(value=6, min=0.001, step=0.1, label="Real Core Size (cm):")
79
- self.core_width_px_widget = FloatSpinBox(value=671, min=1.0, step=1, label="Core Width (px):")
78
+ self.real_core_size_widget = FloatSpinBox(value=6, min=0.001, max=100000, step=0.1, label="Real Core Size (cm):")
79
+ self.core_width_px_widget = FloatSpinBox(value=671, min=1.0, max=100000, step=1, label="Core Width (px):")
80
80
  self.process_save_button = PushButton(text="Process & Save Results")
81
81
 
82
82
  self.reset_button = PushButton(text="Reset for Next Image")
@@ -285,7 +285,12 @@ class ImageAnalysisApp:
285
285
  if 'aligned_image' in self.viewer.layers:
286
286
  self.viewer.layers['aligned_image'].data = aligned_image
287
287
  else:
288
- self.viewer.add_image(aligned_image, name='aligned_image', colormap=image_layer.colormap.name)
288
+ # --- THE FIX: Safely retrieve colormap to prevent silent AttributeError ---
289
+ try:
290
+ c_name = image_layer.colormap.name
291
+ except AttributeError:
292
+ c_name = 'gray'
293
+ self.viewer.add_image(aligned_image, name='aligned_image', colormap=c_name)
289
294
 
290
295
  self.single_path_y_diff = p_diff
291
296
  self.single_path_min_y = p_min
@@ -605,8 +610,8 @@ class ImageAnalysisApp:
605
610
  spi_mode = self.spi_mode_selector.value
606
611
  al_suffix = "_aL" if spi_mode == "tSPI" else ""
607
612
 
608
- path_diff = getattr(self, 'single_path_y_diff', None)
609
- path_diff_scaled = path_diff * pixel_size_cm if path_diff is not None else np.nan
613
+ p_diff = getattr(self, 'single_path_y_diff', None)
614
+ path_diff_scaled = p_diff * pixel_size_cm if p_diff is not None else np.nan
610
615
 
611
616
  pen_stats = getattr(self, 'single_pen_stats', None)
612
617
  if pen_stats:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fspi_analysis
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: A simple plugin to perform fspi analysis within napari
5
5
  Author: Olivier Cahn
6
6
  Author-email: oc124@ic.ac.uk
File without changes
File without changes
File without changes
File without changes