navigate Logo

Getting Started

  • Quick Start Guide
  • Software Installation
  • I Want To…

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
  • Feature Container
  • REST-API
  • Plugin Architecture

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.log_files
    • navigate.model
    • navigate.tools
      • navigate.tools.common_dict_tools
      • navigate.tools.common_functions
      • navigate.tools.decorators
      • navigate.tools.file_functions
      • navigate.tools.image
      • navigate.tools.linear_algebra
      • navigate.tools.main_functions
      • navigate.tools.multipos_table_tools
      • navigate.tools.sdf
        • navigate.tools.sdf.box
        • navigate.tools.sdf.ellipsoid
        • navigate.tools.sdf.sphere
        • navigate.tools.sdf.volume_from_sdf
      • navigate.tools.slicing
      • navigate.tools.waveform_template_funcs
      • navigate.tools.xml_tools
    • navigate.view
navigate
  • Software API
  • navigate.tools
  • navigate.tools.sdf
  • navigate.tools.sdf.volume_from_sdf
  • View page source

navigate.tools.sdf.volume_from_sdf

navigate.tools.sdf.volume_from_sdf(sdf, N, pixel_size=1, subsample_z=1)

Generate an (N, N, N) image from sdf.

Parameters:
  • sdf (function) – A function that accepts (3, NxNxN) points as input and returns the Euclidean distance from each point to the object defined by the SDF.

  • N (int) – Length of volume axis.

  • pixel_size (float) – Rescale the image. Scaling must match object.

  • subsample_z (int) – Return only the values every subsample slices.

Returns:

(N, N, N) image of SDF evaluated for each pixel.

Return type:

npt.ArrayLike

Examples

>>> volume_from_sdf(lambda p: box(p, (15,15,30,)), 128)

Generates a (128, 128, 128) image of a box sdf. The sdf is <= 0 within 128//2-30 to 128//2+29 in z, 128//2-15 to 128//2+14 in x and y.

Previous Next

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