Skip to main content

A python toolkit for visual field analysis

Project description

PyVisualFields

A python tool collection for analyzing visual fields

This packages includes functions for visuald field analysis and display.

https://pypi.org/project/PyVisualFields/

Version 2 is R-independent while maintaining the original module organization. The modules are inspired by vfprogression (Elze et al. [1]) and visualFields (Marin-Franch et al. [2]). Additionally, pyGlaucoMetric has been integrated to enable glaucoma classification based on visual field patterns.

These functions are implemented in Python, and their functionalities are demonstrated across four primary categories:

  • Data Presentation
    
  • Plotting
    
  • Scoring and Progression Analysis
    
  • Normalization Analysis
    
  • Glaucoma Detection
    

For each category, we provide comprehensive Jupyter notebooks containing practical examples, detailed function descriptions, required inputs/dependencies, and expected outputs.

Citation

If you found this package impactful for your research, please cite the following article:

  • Mohammad Eslami, Saber Kazeminasab, Vishal Sharma, Yangjiani Li, Mojtaba Fazli, Mengyu Wang, Nazlee Zebardast, Tobias Elze; PyVisualFields: A Python Package for Visual Field Analysis. Trans. Vis. Sci. Tech. 2023;12(2):6. https://doi.org/10.1167/tvst.12.2.6.

and of course the corresponding sub-package:

  • vfprogression (by Elze et al. [1])
  • visualFields (by Marin-Granch et al. [2])
  • pyGlaucoMetrics (by Moradi et al. [3])

Installation:

pip install PyVisualFields

Demo jupyter notebooks

The list and description of all functions are available at All_Functions. They are all examined and introduced with examples in 4 different notebooks categorized:

Notice: PyGlaucoMetric is also available as a seperatre PyPI package and GitHub repository (built upon PyVisualFields), which includes a graphical user interface (GUI) for progression analysis and glaucoma detection. Indeed PyVisualFields is designed as a developer-facing package library, while pyGlaucoMetric serves as an accessible GUI application implementing selected visual field analysis components. https://github.com/Mousamoradi/PyGlaucoMetrics

references:

[1] https://cran.r-project.org/web/packages/vfprogression/index.html
[2] https://cran.r-project.org/web/packages/visualFields/index.html
[3] Moradi, Mousa, Saber Kazeminasab Hashemabad, Daniel M. Vu, Allison R. Soneru, Asahi Fujita, Mengyu Wang, Tobias Elze, Mohammad Eslami, and Nazlee Zebardast. 2025. "PyGlaucoMetrics: A Stacked Weight-Based Machine Learning Approach for Glaucoma Detection Using Visual Field Data" Medicina 61, no. 3: 541. https://doi.org/10.3390/medicina61030541

list of functions

The list and description of all functions are as follow. They are all examined and introduced with examples in 4 different notebooks. It is important to mention that, based on the background modules, the input VF dataframe needs to have columns with special column names. Make sure, to consider the data notebook. If further information is required, see the corresponding references: vfprogression[1], visualFields[2]


Notice:

Version 2 has been validated exclusively for the 24-2 format. Additionally, the system assumes all visual field measurements are provided in right eye (OD) format.

Functions based on vfprogression package accept 24-2 or 30-2 visual field measurement while functions based on visualFields also accept 10-2.


  •               function   -----------------------------   description   -----------   from package

  • visualFields.data_vfpwgRetest24d2()   -----------   VF data   -----------   visualFields[2]

  • visualFields.data_vfctrSunyiu24d2()   -----------   VF data   -----------   visualFields[2]

  • visualFields.data_vfpwgSunyiu24d2()   -----------   VF data   -----------   visualFields[2]

  • visualFields.data_vfctrSunyiu10d2()   -----------   VF data   -----------   visualFields[2]

  • visualFields.data_vfctrIowaPC26()   -----------   VF data   -----------   visualFields[2]

  • visualFields.data_vfctrIowaPeri()   -----------   VF data   -----------   visualFields[2]

  • vfprogression.data_vfseries()   -----------   VF data   -----------   vfprogression[1]

  • vfprogression.data_vfi()   -----------   VF data   -----------   vfprogression[1]

  • vfprogression.data_cigts()   -----------   VF data   -----------   vfprogression[1]

  • vfprogression.data_plrnouri2012()   -----------   VF data   -----------   vfprogression[1]

  • vfprogression.data_schell2014()   -----------   VF data   -----------   vfprogression[1]

  • vfprogression.get_score_AGIS()   -----------   get AGIS score   -----------   vfprogression[1]

  • vfprogression.get_score_CIGTS()   -----------   get CIGTS score   -----------   vfprogression[1]

  • vfprogression.progression_cigts()   -----------   progression analysis by CIGTS   -----------   vfprogression[1]

  • vfprogression.progression_plrnouri2012()   -----------   progression analysis by Nouri et al.   -----------   vfprogression[1]

  • vfprogression.progression_vfi()  -----------   progression analysis by VFi measurements   -----------   vfprogression[1]

  • vfprogression.progression_schell2014()  -----------   progression analysis by schell et al.   -----------   vfprogression[1]

  • vfprogression.progression_agis()  -----------   progression analysis by AGIS   -----------   vfprogression[1]

  • visualFields.glr()   -----------   Linear regression with global indices   -----------   visualFields[2]

  • visualFields.plr()   -----------   pointwise linear regression (PLR)   -----------   visualFields[2]

  • visualFields.poplr()   -----------   PoPLR regression analysis   -----------   visualFields[2]

  • vfprogression.plotValues()   -----------   plot/save VF values (s, td, pd)   -----------   vfprogression[1]

  • vfprogression.plotProbabilities() -----------   plot/save tdp/pdp values (tdp, pdp)   -----------   vfprogression[1]

  • visualFields.vfplot() -----------   plot/save s/td/pd/tds/pds values (s, td, pd)   -----------   visualFields[2]

  • visualFields.vfplot_s()   -----------   alias for vfplot(type='s')   -----------   visualFields[2]

  • visualFields.vfplot_td()   -----------   alias for vfplot(type='td')   -----------   visualFields[2]

  • visualFields.vfplot_pd()   -----------   alias for vfplot(type='pd')   -----------   visualFields[2]

  • visualFields.vfplot_tds()   -----------   alias for vfplot(type='tds') (s, td, pd)   -----------   visualFields[2]

  • visualFields.vfplot_pds()   -----------   alias for vfplot(type='pds') (s, td, pd)   -----------   visualFields[2]

  • visualFields.plotProbColormap()   -----------   show colormap of probablies   -----------   visualFields[2]

  • visualFields.vfplotsparklines()   -----------   plot/save sparklines (s, td, pd)   -----------   visualFields[2]

  • visualFields.vfplotsparklines_s()   -----------   alias for vfplotsparklines(type='s')   -----------   visualFields[2]

  • visualFields.vfplotsparklines_td()   -----------   alias for vfplotsparklines(type='td')   -----------   visualFields[2]

  • visualFields.vfplotsparklines_pd()   -----------   alias for vfplotsparklines(type='pd')   -----------   visualFields[2]

  • visualFields.vfplotplr()   -----------   --   -----------   visualFields[2]

  • visualFields.vflegoplot()   -----------   --   -----------   visualFields[2]

  • visualFields.vfsfa()   -----------   Generates one-page report of single field analyses as a pdf file   -----------   visualFields[2]

  • currentNV = visualFields.getnv()   -----------   get current normative environment/setting (NV)   -----------   visualFields[2]

  • visualFields.getallvalues()   -----------   compute all td, pd, pdp, tdp, gl, gh,glp based on the current NV   -----------   visualFields[2]

  • visualFields.gettd()   -----------   alias for getallvalues only to compute td   -----------   visualFields[2]

  • visualFields.getgl()   -----------   alias for getallvalues only to compute gl   -----------   visualFields[2]

  • visualFields.gettdp()   -----------   alias for getallvalues only to compute tdp   -----------   visualFields[2]

  • visualFields.getpd()   -----------   alias for getallvalues only to compute pd   -----------   visualFields[2]

  • visualFields.getgh()   -----------   alias for getallvalues only to compute gh   -----------   visualFields[2]

  • visualFields.getpdp()   -----------   alias for getallvalues only to compute pdp   -----------   visualFields[2]

  • visualFields.getglp()   -----------   alias for getallvalues only to compute gi   -----------   visualFields[2]

  • visualFields.get_info_normvals()   -----------   Get all avialbale predefined normalization environments/settings   -----------   visualFields[2]

  • visualFields.setnv()   -----------   change/set normalization environment based on a predefined NV   -----------   visualFields[2]

  • visualFields.nvgenerate   -----------   generate a normalization environment based new data   -----------   visualFields[2]

  • PyGlaucoMetrics.Fn_HAP2   -----------   determine glaucoma cases based on criteria: HAP2   -----------   PyGlaucoMetrics[3]_

  • PyGlaucoMetrics.Fn_UKGTS   -----------   determine glaucoma cases based on criteria: UKGTS   -----------   PyGlaucoMetrics[3]_

  • PyGlaucoMetrics.Fn_LoGTS   -----------   determine glaucoma cases based on criteria: LoGTS   -----------   PyGlaucoMetrics[3]_

  • PyGlaucoMetrics.Fn_Foster   -----------   determine glaucoma cases based on criteria: Foster   -----------   PyGlaucoMetrics[3]_

  • PyGlaucoMetrics.Fn_Kangs   -----------   determine glaucoma cases based on criteria: Kangs   -----------   PyGlaucoMetrics[3]_

Snapshots

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyvisualfields-2.0.2.tar.gz (540.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyvisualfields-2.0.2-py3-none-any.whl (545.7 kB view details)

Uploaded Python 3

File details

Details for the file pyvisualfields-2.0.2.tar.gz.

File metadata

  • Download URL: pyvisualfields-2.0.2.tar.gz
  • Upload date:
  • Size: 540.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for pyvisualfields-2.0.2.tar.gz
Algorithm Hash digest
SHA256 c8120fa1d851ec22aa6eb899ae034afef8bb8d44474e950d4fe2c6ac12a788d1
MD5 46fb8a2b2f49684ddfe2549a7ceb694a
BLAKE2b-256 533d95e2b098759b1acff2c259caf109e48030459787a6ef8935341c20bcf864

See more details on using hashes here.

File details

Details for the file pyvisualfields-2.0.2-py3-none-any.whl.

File metadata

  • Download URL: pyvisualfields-2.0.2-py3-none-any.whl
  • Upload date:
  • Size: 545.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for pyvisualfields-2.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 529b1decc312db48e7b21cb1de544ef4bc8a72eeb7f9daf3af930e84f3841da8
MD5 aa417b43e19505c294553aab0c08b1ce
BLAKE2b-256 ff16ecafa582e406825dee09fa76bdad435903b4badff4d3fe7f5c1a1949702d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page