Skip to content

segmenteverygrain v0.2.5

Choose a tag to compare

@zsylvester zsylvester released this 18 Jan 11:45
· 12 commits to main since this release

Major New Features

  1. New Interactive Editing Interface (interactions module)
  • New GrainPlot class - A fast interactive interface for editing grain segmentations (contributed by Dave Matthews)
  • New Grain class - Object-oriented representation of individual grains with measurement methods
  • New controls:
    • Left-click for instant grain creation or selection
    • Alt+click for multi-prompt grain creation
    • Shift+drag to draw scale bar for unit conversion
    • d to delete, m to merge, z to undo
    • Ctrl to temporarily hide grain masks
  • Helper functions: load_image(), polygons_to_grains(), save_grains(), save_summary(), save_histogram(), save_mask(), get_summary()
  1. New Grain Extraction & Clustering Module (grain_utils)
  • extract_grain_image() / extract_all_grains() - Extract individual grain images
  • extract_vgg16_features() - Deep learning feature extraction using pre-trained CNNs
  • extract_color_features() - Color-based feature extraction
  • cluster_grains() - Cluster grains using K-means/DBSCAN with PCA
  • create_clustered_grain_montage() - Visualize clustered grains
  • ClusterMontageSelector - Interactive QC tool for removing bad grains
  • ClusterMontageLabeler - Interactive tool for labeling grains by category
  • plot_classified_grains() - Visualize grains colored by classification

Repository Reorganization

  • Moved all Jupyter notebooks to notebooks/ folder
  • Updated all documentation links accordingly

Documentation Updates

  • Rewrote interactive editing documentation for new GrainPlot API
  • Added documentation for grain_utils module
  • Reorganized API reference with proper sections
  • Updated README with new interactive controls

Notebook Updates

  • Updated Segment_every_grain.ipynb to use new GrainPlot workflow
  • Updated Segment_every_grain_w_georeferencing.ipynb for new API
  • Updated Segment_every_grain_colab.ipynb for new API
  • Removed obsolete interactive notebook

Bug Fixes

  • Fixed edge grain handling
  • Fixed code to work when no scale bar is present
  • Reverted changes that were causing test failures