Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • VTK VTK
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 735
    • Issues 735
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 205
    • Merge requests 205
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • VTK
  • VTKVTK
  • Issues
  • #1559

Closed
Open
Created Jan 31, 2005 by Kitware Robot@kwrobotOwner

MaximumDistance is left in vtkImageEuclideanDistance when ConsiderAnisotropy is On

This issue was created automatically from an original Mantis Issue. Further discussion may take place here.


The following script should show a concentric distance map, but a very high value is shown spuriously on it.

vtkSphere sphere vtkSampleFunction sample sample SetImplicitFunction sphere vtkImageThreshold thresh thresh SetInput [sample GetOutput] thresh ThresholdByUpper 0 thresh SetInValue 1 thresh SetOutValue 0 vtkImageEuclideanDistance distan distan SetInput [thresh GetOutput] vtkImageViewer viewer viewer SetInput [distan GetOutput] viewer SetColorWindow 2 viewer SetColorLevel 1 viewer Render

In vtkImageEuclideanDistance, the default MaximumDistance is VTK_INT_MAX. The spurious parts keep the value unprocessed. Though I couldn't understand the algorithm, I found suspect lines in vtkImageEuclideanDistance.cxx : b=(int)(floor)((((buff[idx0]-buffer)/spacing)-1)/2);

The variables buff[idx0] and buffer seem to be set squared distances. It's strange to divide only once by spacing. Moreover, if one of these variables was VTK_INT_MAX and spacing<<1, the result would overflow.

Assignee
Assign to
Time tracking