navigate Logo

Getting Started

  • Computer Considerations
  • Computer Power Configuration
  • Software Installation
  • Launching Navigate
  • Configuring Navigate
  • Acquiring Data
  • Smart Acquisition Routines

User Guide

  • Supported Hardware
  • Supported File Formats
  • User Interface Walkthrough
  • Setting Up a Microscope
  • Acquiring Data
  • Case Studies

Development

  • Contributing Guidelines
  • Developer Install
  • Software Architecture
  • Developer Architecture Concepts
  • Feature Container
  • REST API
  • Plugin Architecture
  • Adding New Hardware

Troubleshooting & Known Issues

  • Troubleshooting
  • Known Issues

Plugins

  • navigate Plugin Template
  • navigate Confocal Projection
  • navigate at Scale
  • navigate Constant Velocity Acquisition
  • navigate MMCore
  • navigate ilastik Server
  • navigate Photoactivation

Reference

  • Implemented Microscopes
  • Software API
    • navigate.config
    • navigate.controller
    • navigate.controller.configurator
    • navigate.log_files
    • navigate.model
      • navigate.model.analysis
      • navigate.model.concurrency
      • navigate.model.data_sources
      • navigate.model.device_startup_functions
      • navigate.model.devices
      • navigate.model.features
        • navigate.model.features.adaptive_optics
        • navigate.model.features.auto_tile_scan
        • navigate.model.features.autofocus
        • navigate.model.features.base
        • navigate.model.features.common_features
        • navigate.model.features.feature_container
        • navigate.model.features.feature_related_functions
        • navigate.model.features.image_writer
        • navigate.model.features.parameter_tools
        • navigate.model.features.remove_empty_tiles
        • navigate.model.features.restful_features
        • navigate.model.features.update_setting
        • navigate.model.features.volume_search
      • navigate.model.metadata_sources
      • navigate.model.microscope
      • navigate.model.model
      • navigate.model.plugins_model
      • navigate.model.resolution_change
      • navigate.model.waveforms
    • navigate.tools
    • navigate.view
navigate
  • Acquiring Data
  • Currently Implemented Features
  • navigate.model.features.remove_empty_tiles
  • navigate.model.features.remove_empty_tiles.detect_tissue
  • View page source

navigate.model.features.remove_empty_tiles.detect_tissue

navigate.model.features.remove_empty_tiles.detect_tissue(image_data, percentage=0.0)

Detect tissue in an image and determine if it exceeds a specified percentage.

This function takes an image in the form of image data and detects tissue within the image. It calculates the percentage of tissue area with respect to the total number of cells in a 50-pixel boundary grid.

Parameters:
  • image_data (ndarray) – A NumPy array representing the image data. The image should be preprocessed and ready for tissue detection.

  • percentage (float, optional (default: 0.0)) – The threshold fraction of tissue grid cells, from 0 to 1, for the image to be considered as containing tissue. If the detected tissue percentage is strictly greater than this value, the function returns True; otherwise, it returns False.

Returns:

True if the detected tissue fraction is strictly greater than the specified fraction; False otherwise.

Return type:

bool

Notes

  • The function counts tissue grid cells within the detected row boundaries after downsampling the thresholded image by a factor of 50.

  • It calculates the tissue percentage by dividing the number of tissue squares by the total possible squares in the image.

  • The width of the sliding window is determined by the ‘width’ variable.

Examples

Check whether tissue covers more than half of the boundary grid:

image_data = np.zeros((100, 100), dtype=np.uint16)
image_data[:50, :] = 100
result = detect_tissue(image_data, percentage=0.5)

Here the upper two of four 50-pixel grid cells contain tissue. The fraction is exactly 0.5, so the strict comparison returns False.

Previous Next

© Copyright 2026, Dean Lab, UT Southwestern Medical Center.