PyVisualFields 2.0.2__tar.gz → 2.0.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. pyvisualfields-2.0.3/MANIFEST.in +2 -0
  2. {pyvisualfields-2.0.2/src/PyVisualFields.egg-info → pyvisualfields-2.0.3}/PKG-INFO +178 -180
  3. {pyvisualfields-2.0.2 → pyvisualfields-2.0.3}/README.md +144 -144
  4. {pyvisualfields-2.0.2 → pyvisualfields-2.0.3}/pyproject.toml +5 -5
  5. {pyvisualfields-2.0.2 → pyvisualfields-2.0.3}/setup.cfg +4 -4
  6. {pyvisualfields-2.0.2 → pyvisualfields-2.0.3}/setup.py +45 -45
  7. {pyvisualfields-2.0.2 → pyvisualfields-2.0.3}/src/PyVisualFields/PyGlaucoMetrics.py +563 -563
  8. pyvisualfields-2.0.3/src/PyVisualFields/__init__.py +1 -0
  9. {pyvisualfields-2.0.2 → pyvisualfields-2.0.3}/src/PyVisualFields/visualFields.py +104 -39
  10. {pyvisualfields-2.0.2 → pyvisualfields-2.0.3/src/PyVisualFields.egg-info}/PKG-INFO +178 -180
  11. {pyvisualfields-2.0.2 → pyvisualfields-2.0.3}/src/PyVisualFields.egg-info/SOURCES.txt +0 -1
  12. pyvisualfields-2.0.2/MANIFEST.in +0 -2
  13. pyvisualfields-2.0.2/license +0 -19
  14. pyvisualfields-2.0.2/src/PyVisualFields/__init__.py +0 -1
  15. {pyvisualfields-2.0.2 → pyvisualfields-2.0.3}/src/PyVisualFields/Deviation_Analysis.py +0 -0
  16. {pyvisualfields-2.0.2 → pyvisualfields-2.0.3}/src/PyVisualFields/pkl_files/locmaps.json +0 -0
  17. {pyvisualfields-2.0.2 → pyvisualfields-2.0.3}/src/PyVisualFields/pkl_files/normvals.json +0 -0
  18. {pyvisualfields-2.0.2 → pyvisualfields-2.0.3}/src/PyVisualFields/pkl_files/normvals_meta.json +0 -0
  19. {pyvisualfields-2.0.2 → pyvisualfields-2.0.3}/src/PyVisualFields/pkl_files/vf.cigts.pkl +0 -0
  20. {pyvisualfields-2.0.2 → pyvisualfields-2.0.3}/src/PyVisualFields/pkl_files/vf.plr.nouri.2012.pkl +0 -0
  21. {pyvisualfields-2.0.2 → pyvisualfields-2.0.3}/src/PyVisualFields/pkl_files/vf.schell2014.pkl +0 -0
  22. {pyvisualfields-2.0.2 → pyvisualfields-2.0.3}/src/PyVisualFields/pkl_files/vf.vfi.pkl +0 -0
  23. {pyvisualfields-2.0.2 → pyvisualfields-2.0.3}/src/PyVisualFields/pkl_files/vfctrIowaPC26.pkl +0 -0
  24. {pyvisualfields-2.0.2 → pyvisualfields-2.0.3}/src/PyVisualFields/pkl_files/vfctrIowaPeri.pkl +0 -0
  25. {pyvisualfields-2.0.2 → pyvisualfields-2.0.3}/src/PyVisualFields/pkl_files/vfctrSunyiu10d2.pkl +0 -0
  26. {pyvisualfields-2.0.2 → pyvisualfields-2.0.3}/src/PyVisualFields/pkl_files/vfctrSunyiu24d2.pkl +0 -0
  27. {pyvisualfields-2.0.2 → pyvisualfields-2.0.3}/src/PyVisualFields/pkl_files/vfpwgRetest24d2.pkl +0 -0
  28. {pyvisualfields-2.0.2 → pyvisualfields-2.0.3}/src/PyVisualFields/pkl_files/vfpwgSunyiu24d2.pkl +0 -0
  29. {pyvisualfields-2.0.2 → pyvisualfields-2.0.3}/src/PyVisualFields/pkl_files/vfseries.pkl +0 -0
  30. {pyvisualfields-2.0.2 → pyvisualfields-2.0.3}/src/PyVisualFields/utils.py +0 -0
  31. {pyvisualfields-2.0.2 → pyvisualfields-2.0.3}/src/PyVisualFields/vfprogression.py +0 -0
  32. {pyvisualfields-2.0.2 → pyvisualfields-2.0.3}/src/PyVisualFields.egg-info/dependency_links.txt +0 -0
  33. {pyvisualfields-2.0.2 → pyvisualfields-2.0.3}/src/PyVisualFields.egg-info/requires.txt +0 -0
  34. {pyvisualfields-2.0.2 → pyvisualfields-2.0.3}/src/PyVisualFields.egg-info/top_level.txt +0 -0
@@ -0,0 +1,2 @@
1
+ recursive-include PyVisualFields/pkl_files *.pkl
2
+ recursive-include PyVisualFields/pkl_files *.json
@@ -1,180 +1,178 @@
1
- Metadata-Version: 2.4
2
- Name: PyVisualFields
3
- Version: 2.0.2
4
- Summary: A python toolkit for visual field analysis
5
- Home-page: https://github.com/mohaEs/PyVisualField
6
- Author: Mohammad Eslami, Bharath Erusalagandi, Mousa Moradi
7
- Author-email: Mohammad_eslami@meei.harvard.edu
8
- Project-URL: Bug Tracker, https://github.com/mohaEs/PyVisualField/issues
9
- Project-URL: Demo Normalization, https://github.com/mohaEs/PyVisualField/blob/main/demo_2_Deviation_Analysis.ipynb
10
- Project-URL: Demo Plotting, https://github.com/mohaEs/PyVisualField/blob/main/demo_3_Plotting.ipynb
11
- Project-URL: Demo Prorgression Analysis, https://github.com/mohaEs/PyVisualField/blob/main/demo_4_Analysis.ipynb
12
- Project-URL: Demo Data, https://github.com/mohaEs/PyVisualField/blob/main/demo_1_Data.ipynb
13
- Project-URL: Demo Glaucoma Detection, https://github.com/mohaEs/PyVisualField/blob/main/demo5_PyGlaucoMetrics.ipynb
14
- Project-URL: Harvard Ophthalmology AI LAB, https://ophai.hms.harvard.edu/
15
- Classifier: Programming Language :: Python :: 3
16
- Classifier: License :: OSI Approved :: MIT License
17
- Classifier: Operating System :: OS Independent
18
- Requires-Python: >=3.6
19
- Description-Content-Type: text/markdown
20
- License-File: license
21
- Requires-Dist: numpy
22
- Requires-Dist: pandas
23
- Requires-Dist: scipy
24
- Requires-Dist: matplotlib
25
- Dynamic: author
26
- Dynamic: author-email
27
- Dynamic: classifier
28
- Dynamic: description
29
- Dynamic: description-content-type
30
- Dynamic: home-page
31
- Dynamic: license-file
32
- Dynamic: project-url
33
- Dynamic: requires-dist
34
- Dynamic: requires-python
35
- Dynamic: summary
36
-
37
- # PyVisualFields
38
-
39
- ## A python tool collection for analyzing visual fields
40
-
41
- This packages includes functions for visuald field analysis and display.
42
-
43
- https://pypi.org/project/PyVisualFields/
44
-
45
- 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]).
46
- Additionally, pyGlaucoMetric has been integrated to enable glaucoma classification based on visual field patterns.
47
-
48
- These functions are implemented in Python, and their functionalities are demonstrated across four primary categories:
49
- - Data Presentation
50
- - Plotting
51
- - Scoring and Progression Analysis
52
- - Normalization Analysis
53
- - Glaucoma Detection
54
-
55
- For each category, we provide comprehensive Jupyter notebooks containing practical examples, detailed function descriptions, required inputs/dependencies, and expected outputs.
56
-
57
- ## Citation
58
- If you found this package impactful for your research, please cite the following article:
59
- - 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.
60
-
61
- and of course the corresponding sub-package:
62
- - vfprogression (by Elze et al. [1])
63
- - visualFields (by Marin-Granch et al. [2])
64
- - pyGlaucoMetrics (by Moradi et al. [3])
65
-
66
- ## Installation:
67
-
68
- > pip install PyVisualFields
69
-
70
- ## Demo jupyter notebooks
71
-
72
- The list and description of all functions are available at [All_Functions](#list-of-functions). They are all examined and introduced with examples in 4 different notebooks categorized: </br>
73
- - Data [demo_1_Data.ipynb](demo_1_Data.ipynb)
74
- - Normalization and deviation analysis [demo_2_Deviation_Analysis.ipynb](demo_2_Deviation_Analysis.ipynb)
75
- - Plotting [demo_3_Plotting.ipynb](demo_3_Plotting.ipynb)
76
- - Progression Analysis [demo_4_Analysis.ipynb](demo_4_Analysis.ipynb)
77
- - Glaucoma Detection [demo5_PyGlaucoMetrics.ipynb](demo5_PyGlaucoMetrics.ipynb) </br>
78
-
79
- __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.
80
- https://github.com/Mousamoradi/PyGlaucoMetrics
81
-
82
-
83
- ## references:
84
- [1] https://cran.r-project.org/web/packages/vfprogression/index.html </br>
85
- [2] https://cran.r-project.org/web/packages/visualFields/index.html </br>
86
- [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
87
- </br>
88
-
89
-
90
- ## list of functions
91
- 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]_ </br>
92
- - Data [demo_1_Data.ipynb](demo_1_Data.ipynb)
93
- - Normalization and deviation analysis [demo_2_Deviation_Analysis.ipynb](demo_2_Deviation_Analysis.ipynb)
94
- - Plotting [demo_3_Plotting.ipynb](demo_3_Plotting.ipynb)
95
- - Progression Analysis [demo_4_Analysis.ipynb](demo_4_Analysis.ipynb)
96
- - Glaucoma Detection [demo5_PyGlaucoMetrics.ipynb](demo5_PyGlaucoMetrics.ipynb)
97
- </br>
98
-
99
- ### Notice:
100
- 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.
101
-
102
- Functions based on _vfprogression_ package accept 24-2 or 30-2 visual field measurement while functions based on _visualFields_ also accept 10-2.
103
-
104
- </br>
105
-
106
- - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; __function__ &nbsp; ----------------------------- &nbsp; __description__ &nbsp; ----------- &nbsp; __from package__ </br> </br>
107
- - visualFields.data_vfpwgRetest24d2() &nbsp; ----------- &nbsp; VF data &nbsp; ----------- &nbsp; _visualFields[2]_
108
- - visualFields.data_vfctrSunyiu24d2() &nbsp; ----------- &nbsp; VF data &nbsp; ----------- &nbsp; _visualFields[2]_
109
- - visualFields.data_vfpwgSunyiu24d2() &nbsp; ----------- &nbsp; VF data &nbsp; ----------- &nbsp; _visualFields[2]_
110
- - visualFields.data_vfctrSunyiu10d2() &nbsp; ----------- &nbsp; VF data &nbsp; ----------- &nbsp; _visualFields[2]_
111
- - visualFields.data_vfctrIowaPC26() &nbsp; ----------- &nbsp; VF data &nbsp; ----------- &nbsp; _visualFields[2]_
112
- - visualFields.data_vfctrIowaPeri() &nbsp; ----------- &nbsp; VF data &nbsp; ----------- &nbsp; _visualFields[2]_ </br></br>
113
- - vfprogression.data_vfseries() &nbsp; ----------- &nbsp; VF data &nbsp; ----------- &nbsp; _vfprogression[1]_
114
- - vfprogression.data_vfi() &nbsp; ----------- &nbsp; VF data &nbsp; ----------- &nbsp; _vfprogression[1]_
115
- - vfprogression.data_cigts() &nbsp; ----------- &nbsp; VF data &nbsp; ----------- &nbsp; _vfprogression[1]_
116
- - vfprogression.data_plrnouri2012() &nbsp; ----------- &nbsp; VF data &nbsp; ----------- &nbsp; _vfprogression[1]_
117
- - vfprogression.data_schell2014() &nbsp; ----------- &nbsp; VF data &nbsp; ----------- &nbsp; _vfprogression[1]_ </br></br>
118
- - vfprogression.get_score_AGIS() &nbsp; ----------- &nbsp; get AGIS score &nbsp; ----------- &nbsp; _vfprogression[1]_
119
- - vfprogression.get_score_CIGTS() &nbsp; ----------- &nbsp; get CIGTS score &nbsp; ----------- &nbsp; _vfprogression[1]_
120
- - vfprogression.progression_cigts() &nbsp; ----------- &nbsp; progression analysis by CIGTS &nbsp; ----------- &nbsp; _vfprogression[1]_
121
- - vfprogression.progression_plrnouri2012() &nbsp; ----------- &nbsp; progression analysis by Nouri et al. &nbsp; ----------- &nbsp; _vfprogression[1]_
122
- - vfprogression.progression_vfi()&nbsp; ----------- &nbsp; progression analysis by VFi measurements &nbsp; ----------- &nbsp; _vfprogression[1]_
123
- - vfprogression.progression_schell2014()&nbsp; ----------- &nbsp; progression analysis by schell et al. &nbsp; ----------- &nbsp; _vfprogression[1]_
124
- - vfprogression.progression_agis()&nbsp; ----------- &nbsp; progression analysis by AGIS &nbsp; ----------- &nbsp; _vfprogression[1]_ </br></br>
125
- - visualFields.glr() &nbsp; ----------- &nbsp; Linear regression with global indices &nbsp; ----------- &nbsp; _visualFields[2]_
126
- - visualFields.plr() &nbsp; ----------- &nbsp; pointwise linear regression (PLR) &nbsp; ----------- &nbsp; _visualFields[2]_
127
- - visualFields.poplr() &nbsp; ----------- &nbsp; PoPLR regression analysis &nbsp; ----------- &nbsp; _visualFields[2]_ </br></br>
128
- - vfprogression.plotValues() &nbsp; ----------- &nbsp; plot/save VF values (s, td, pd) &nbsp; ----------- &nbsp; _vfprogression[1]_
129
- - vfprogression.plotProbabilities() ----------- &nbsp; plot/save tdp/pdp values (tdp, pdp) &nbsp; ----------- &nbsp; _vfprogression[1]_
130
- - visualFields.vfplot() ----------- &nbsp; plot/save s/td/pd/tds/pds values (s, td, pd) &nbsp; ----------- &nbsp; _visualFields[2]_
131
- - visualFields.vfplot_s() &nbsp; ----------- &nbsp; alias for vfplot(type='s') &nbsp; ----------- &nbsp; _visualFields[2]_
132
- - visualFields.vfplot_td() &nbsp; ----------- &nbsp; alias for vfplot(type='td') &nbsp; ----------- &nbsp; _visualFields[2]_
133
- - visualFields.vfplot_pd() &nbsp; ----------- &nbsp; alias for vfplot(type='pd') &nbsp; ----------- &nbsp; _visualFields[2]_
134
- - visualFields.vfplot_tds() &nbsp; ----------- &nbsp; alias for vfplot(type='tds') (s, td, pd) &nbsp; ----------- &nbsp; _visualFields[2]_
135
- - visualFields.vfplot_pds() &nbsp; ----------- &nbsp; alias for vfplot(type='pds') (s, td, pd) &nbsp; ----------- &nbsp; _visualFields[2]_
136
- - visualFields.plotProbColormap() &nbsp; ----------- &nbsp; show colormap of probablies &nbsp; ----------- &nbsp; _visualFields[2]_
137
- - visualFields.vfplotsparklines() &nbsp; ----------- &nbsp; plot/save sparklines (s, td, pd) &nbsp; ----------- &nbsp; _visualFields[2]_
138
- - visualFields.vfplotsparklines_s() &nbsp; ----------- &nbsp; alias for vfplotsparklines(type='s') &nbsp; ----------- &nbsp; _visualFields[2]_
139
- - visualFields.vfplotsparklines_td() &nbsp; ----------- &nbsp; alias for vfplotsparklines(type='td') &nbsp; ----------- &nbsp; _visualFields[2]_
140
- - visualFields.vfplotsparklines_pd() &nbsp; ----------- &nbsp; alias for vfplotsparklines(type='pd') &nbsp; ----------- &nbsp; _visualFields[2]_
141
- - visualFields.vfplotplr() &nbsp; ----------- &nbsp; -- &nbsp; ----------- &nbsp; _visualFields[2]_
142
- - visualFields.vflegoplot() &nbsp; ----------- &nbsp; -- &nbsp; ----------- &nbsp; _visualFields[2]_
143
- - visualFields.vfsfa() &nbsp; ----------- &nbsp; Generates one-page report of single field analyses as a pdf file &nbsp; ----------- &nbsp; _visualFields[2]_ </br></br>
144
- - currentNV = visualFields.getnv() &nbsp; ----------- &nbsp; get current normative environment/setting (NV) &nbsp; ----------- &nbsp; _visualFields[2]_
145
- - visualFields.getallvalues() &nbsp; ----------- &nbsp; compute all td, pd, pdp, tdp, gl, gh,glp based on the current NV &nbsp; ----------- &nbsp; _visualFields[2]_
146
- - visualFields.gettd() &nbsp; ----------- &nbsp; alias for getallvalues only to compute td &nbsp; ----------- &nbsp; _visualFields[2]_
147
- - visualFields.getgl() &nbsp; ----------- &nbsp; alias for getallvalues only to compute gl &nbsp; ----------- &nbsp; _visualFields[2]_
148
- - visualFields.gettdp() &nbsp; ----------- &nbsp; alias for getallvalues only to compute tdp &nbsp; ----------- &nbsp; _visualFields[2]_
149
- - visualFields.getpd() &nbsp; ----------- &nbsp; alias for getallvalues only to compute pd &nbsp; ----------- &nbsp; _visualFields[2]_
150
- - visualFields.getgh() &nbsp; ----------- &nbsp; alias for getallvalues only to compute gh &nbsp; ----------- &nbsp; _visualFields[2]_
151
- - visualFields.getpdp() &nbsp; ----------- &nbsp; alias for getallvalues only to compute pdp &nbsp; ----------- &nbsp; _visualFields[2]_
152
- - visualFields.getglp() &nbsp; ----------- &nbsp; alias for getallvalues only to compute gi &nbsp; ----------- &nbsp; _visualFields[2]_
153
- - visualFields.get_info_normvals() &nbsp; ----------- &nbsp; Get all avialbale predefined normalization environments/settings &nbsp; ----------- &nbsp; _visualFields[2]_
154
- - visualFields.setnv() &nbsp; ----------- &nbsp; change/set normalization environment based on a predefined NV &nbsp; ----------- &nbsp; _visualFields[2]_
155
- - visualFields.nvgenerate &nbsp; ----------- &nbsp; generate a normalization environment based new data &nbsp; ----------- &nbsp; _visualFields[2]_</br></br>
156
-
157
- - PyGlaucoMetrics.Fn_HAP2 &nbsp; ----------- &nbsp; determine glaucoma cases based on criteria: HAP2 &nbsp; ----------- &nbsp; PyGlaucoMetrics[3]_
158
- - PyGlaucoMetrics.Fn_UKGTS &nbsp; ----------- &nbsp; determine glaucoma cases based on criteria: UKGTS &nbsp; ----------- &nbsp; PyGlaucoMetrics[3]_
159
- - PyGlaucoMetrics.Fn_LoGTS &nbsp; ----------- &nbsp; determine glaucoma cases based on criteria: LoGTS &nbsp; ----------- &nbsp; PyGlaucoMetrics[3]_
160
- - PyGlaucoMetrics.Fn_Foster &nbsp; ----------- &nbsp; determine glaucoma cases based on criteria: Foster &nbsp; ----------- &nbsp; PyGlaucoMetrics[3]_
161
- - PyGlaucoMetrics.Fn_Kangs &nbsp; ----------- &nbsp; determine glaucoma cases based on criteria: Kangs &nbsp; ----------- &nbsp; PyGlaucoMetrics[3]_
162
-
163
-
164
-
165
- ## Snapshots
166
-
167
-
168
- <img src="./imgs/1_(12).png" width="50%">
169
- <img src="./imgs/1_(11).png" width="50%">
170
- <img src="./imgs/1_(1).png" width="50%">
171
- <img src="./imgs/1_(2).png" width="50%">
172
- <img src="./imgs/1_(3).png" width="50%">
173
- <img src="./imgs/1_(4).png" width="50%">
174
- <img src="./imgs/1_(5).png" width="50%">
175
- <img src="./imgs/1_(10).png" width="50%">
176
- <img src="./imgs/1_(6).png" width="50%">
177
- <img src="./imgs/1_(8).png" width="50%">
178
- <img src="./imgs/1_(14).png" width="50%">
179
- <img src="./imgs/1_(13).png" width="50%">
180
-
1
+ Metadata-Version: 2.4
2
+ Name: PyVisualFields
3
+ Version: 2.0.3
4
+ Summary: A python toolkit for visual field analysis
5
+ Home-page: https://github.com/mohaEs/PyVisualField
6
+ Author: Mohammad Eslami, Bharath Erusalagandi, Mousa Moradi
7
+ Author-email: Mohammad_eslami@meei.harvard.edu
8
+ Project-URL: Bug Tracker, https://github.com/mohaEs/PyVisualField/issues
9
+ Project-URL: Demo Normalization, https://github.com/mohaEs/PyVisualField/blob/main/demo_2_Deviation_Analysis.ipynb
10
+ Project-URL: Demo Plotting, https://github.com/mohaEs/PyVisualField/blob/main/demo_3_Plotting.ipynb
11
+ Project-URL: Demo Prorgression Analysis, https://github.com/mohaEs/PyVisualField/blob/main/demo_4_Analysis.ipynb
12
+ Project-URL: Demo Data, https://github.com/mohaEs/PyVisualField/blob/main/demo_1_Data.ipynb
13
+ Project-URL: Demo Glaucoma Detection, https://github.com/mohaEs/PyVisualField/blob/main/demo5_PyGlaucoMetrics.ipynb
14
+ Project-URL: Harvard Ophthalmology AI LAB, https://ophai.hms.harvard.edu/
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: License :: OSI Approved :: MIT License
17
+ Classifier: Operating System :: OS Independent
18
+ Requires-Python: >=3.6
19
+ Description-Content-Type: text/markdown
20
+ Requires-Dist: numpy
21
+ Requires-Dist: pandas
22
+ Requires-Dist: scipy
23
+ Requires-Dist: matplotlib
24
+ Dynamic: author
25
+ Dynamic: author-email
26
+ Dynamic: classifier
27
+ Dynamic: description
28
+ Dynamic: description-content-type
29
+ Dynamic: home-page
30
+ Dynamic: project-url
31
+ Dynamic: requires-dist
32
+ Dynamic: requires-python
33
+ Dynamic: summary
34
+
35
+ # PyVisualFields
36
+
37
+ ## A python tool collection for analyzing visual fields
38
+
39
+ This packages includes functions for visuald field analysis and display.
40
+
41
+ https://pypi.org/project/PyVisualFields/
42
+
43
+ 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]).
44
+ Additionally, pyGlaucoMetric has been integrated to enable glaucoma classification based on visual field patterns.
45
+
46
+ These functions are implemented in Python, and their functionalities are demonstrated across four primary categories:
47
+ - Data Presentation
48
+ - Plotting
49
+ - Scoring and Progression Analysis
50
+ - Normalization Analysis
51
+ - Glaucoma Detection
52
+
53
+ For each category, we provide comprehensive Jupyter notebooks containing practical examples, detailed function descriptions, required inputs/dependencies, and expected outputs.
54
+
55
+ ## Citation
56
+ If you found this package impactful for your research, please cite the following article:
57
+ - 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.
58
+
59
+ and of course the corresponding sub-package:
60
+ - vfprogression (by Elze et al. [1])
61
+ - visualFields (by Marin-Granch et al. [2])
62
+ - pyGlaucoMetrics (by Moradi et al. [3])
63
+
64
+ ## Installation:
65
+
66
+ > pip install PyVisualFields
67
+
68
+ ## Demo jupyter notebooks
69
+
70
+ The list and description of all functions are available at [All_Functions](#list-of-functions). They are all examined and introduced with examples in 4 different notebooks categorized: </br>
71
+ - Data [demo_1_Data.ipynb](demo_1_Data.ipynb)
72
+ - Normalization and deviation analysis [demo_2_Deviation_Analysis.ipynb](demo_2_Deviation_Analysis.ipynb)
73
+ - Plotting [demo_3_Plotting.ipynb](demo_3_Plotting.ipynb)
74
+ - Progression Analysis [demo_4_Analysis.ipynb](demo_4_Analysis.ipynb)
75
+ - Glaucoma Detection [demo5_PyGlaucoMetrics.ipynb](demo5_PyGlaucoMetrics.ipynb) </br>
76
+
77
+ __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.
78
+ https://github.com/Mousamoradi/PyGlaucoMetrics
79
+
80
+
81
+ ## references:
82
+ [1] https://cran.r-project.org/web/packages/vfprogression/index.html </br>
83
+ [2] https://cran.r-project.org/web/packages/visualFields/index.html </br>
84
+ [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
85
+ </br>
86
+
87
+
88
+ ## list of functions
89
+ 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]_ </br>
90
+ - Data [demo_1_Data.ipynb](demo_1_Data.ipynb)
91
+ - Normalization and deviation analysis [demo_2_Deviation_Analysis.ipynb](demo_2_Deviation_Analysis.ipynb)
92
+ - Plotting [demo_3_Plotting.ipynb](demo_3_Plotting.ipynb)
93
+ - Progression Analysis [demo_4_Analysis.ipynb](demo_4_Analysis.ipynb)
94
+ - Glaucoma Detection [demo5_PyGlaucoMetrics.ipynb](demo5_PyGlaucoMetrics.ipynb)
95
+ </br>
96
+
97
+ ### Notice:
98
+ 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.
99
+
100
+ Functions based on _vfprogression_ package accept 24-2 or 30-2 visual field measurement while functions based on _visualFields_ also accept 10-2.
101
+
102
+ </br>
103
+
104
+ - &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; __function__ &nbsp; ----------------------------- &nbsp; __description__ &nbsp; ----------- &nbsp; __from package__ </br> </br>
105
+ - visualFields.data_vfpwgRetest24d2() &nbsp; ----------- &nbsp; VF data &nbsp; ----------- &nbsp; _visualFields[2]_
106
+ - visualFields.data_vfctrSunyiu24d2() &nbsp; ----------- &nbsp; VF data &nbsp; ----------- &nbsp; _visualFields[2]_
107
+ - visualFields.data_vfpwgSunyiu24d2() &nbsp; ----------- &nbsp; VF data &nbsp; ----------- &nbsp; _visualFields[2]_
108
+ - visualFields.data_vfctrSunyiu10d2() &nbsp; ----------- &nbsp; VF data &nbsp; ----------- &nbsp; _visualFields[2]_
109
+ - visualFields.data_vfctrIowaPC26() &nbsp; ----------- &nbsp; VF data &nbsp; ----------- &nbsp; _visualFields[2]_
110
+ - visualFields.data_vfctrIowaPeri() &nbsp; ----------- &nbsp; VF data &nbsp; ----------- &nbsp; _visualFields[2]_ </br></br>
111
+ - vfprogression.data_vfseries() &nbsp; ----------- &nbsp; VF data &nbsp; ----------- &nbsp; _vfprogression[1]_
112
+ - vfprogression.data_vfi() &nbsp; ----------- &nbsp; VF data &nbsp; ----------- &nbsp; _vfprogression[1]_
113
+ - vfprogression.data_cigts() &nbsp; ----------- &nbsp; VF data &nbsp; ----------- &nbsp; _vfprogression[1]_
114
+ - vfprogression.data_plrnouri2012() &nbsp; ----------- &nbsp; VF data &nbsp; ----------- &nbsp; _vfprogression[1]_
115
+ - vfprogression.data_schell2014() &nbsp; ----------- &nbsp; VF data &nbsp; ----------- &nbsp; _vfprogression[1]_ </br></br>
116
+ - vfprogression.get_score_AGIS() &nbsp; ----------- &nbsp; get AGIS score &nbsp; ----------- &nbsp; _vfprogression[1]_
117
+ - vfprogression.get_score_CIGTS() &nbsp; ----------- &nbsp; get CIGTS score &nbsp; ----------- &nbsp; _vfprogression[1]_
118
+ - vfprogression.progression_cigts() &nbsp; ----------- &nbsp; progression analysis by CIGTS &nbsp; ----------- &nbsp; _vfprogression[1]_
119
+ - vfprogression.progression_plrnouri2012() &nbsp; ----------- &nbsp; progression analysis by Nouri et al. &nbsp; ----------- &nbsp; _vfprogression[1]_
120
+ - vfprogression.progression_vfi()&nbsp; ----------- &nbsp; progression analysis by VFi measurements &nbsp; ----------- &nbsp; _vfprogression[1]_
121
+ - vfprogression.progression_schell2014()&nbsp; ----------- &nbsp; progression analysis by schell et al. &nbsp; ----------- &nbsp; _vfprogression[1]_
122
+ - vfprogression.progression_agis()&nbsp; ----------- &nbsp; progression analysis by AGIS &nbsp; ----------- &nbsp; _vfprogression[1]_ </br></br>
123
+ - visualFields.glr() &nbsp; ----------- &nbsp; Linear regression with global indices &nbsp; ----------- &nbsp; _visualFields[2]_
124
+ - visualFields.plr() &nbsp; ----------- &nbsp; pointwise linear regression (PLR) &nbsp; ----------- &nbsp; _visualFields[2]_
125
+ - visualFields.poplr() &nbsp; ----------- &nbsp; PoPLR regression analysis &nbsp; ----------- &nbsp; _visualFields[2]_ </br></br>
126
+ - vfprogression.plotValues() &nbsp; ----------- &nbsp; plot/save VF values (s, td, pd) &nbsp; ----------- &nbsp; _vfprogression[1]_
127
+ - vfprogression.plotProbabilities() ----------- &nbsp; plot/save tdp/pdp values (tdp, pdp) &nbsp; ----------- &nbsp; _vfprogression[1]_
128
+ - visualFields.vfplot() ----------- &nbsp; plot/save s/td/pd/tds/pds values (s, td, pd) &nbsp; ----------- &nbsp; _visualFields[2]_
129
+ - visualFields.vfplot_s() &nbsp; ----------- &nbsp; alias for vfplot(type='s') &nbsp; ----------- &nbsp; _visualFields[2]_
130
+ - visualFields.vfplot_td() &nbsp; ----------- &nbsp; alias for vfplot(type='td') &nbsp; ----------- &nbsp; _visualFields[2]_
131
+ - visualFields.vfplot_pd() &nbsp; ----------- &nbsp; alias for vfplot(type='pd') &nbsp; ----------- &nbsp; _visualFields[2]_
132
+ - visualFields.vfplot_tds() &nbsp; ----------- &nbsp; alias for vfplot(type='tds') (s, td, pd) &nbsp; ----------- &nbsp; _visualFields[2]_
133
+ - visualFields.vfplot_pds() &nbsp; ----------- &nbsp; alias for vfplot(type='pds') (s, td, pd) &nbsp; ----------- &nbsp; _visualFields[2]_
134
+ - visualFields.plotProbColormap() &nbsp; ----------- &nbsp; show colormap of probablies &nbsp; ----------- &nbsp; _visualFields[2]_
135
+ - visualFields.vfplotsparklines() &nbsp; ----------- &nbsp; plot/save sparklines (s, td, pd) &nbsp; ----------- &nbsp; _visualFields[2]_
136
+ - visualFields.vfplotsparklines_s() &nbsp; ----------- &nbsp; alias for vfplotsparklines(type='s') &nbsp; ----------- &nbsp; _visualFields[2]_
137
+ - visualFields.vfplotsparklines_td() &nbsp; ----------- &nbsp; alias for vfplotsparklines(type='td') &nbsp; ----------- &nbsp; _visualFields[2]_
138
+ - visualFields.vfplotsparklines_pd() &nbsp; ----------- &nbsp; alias for vfplotsparklines(type='pd') &nbsp; ----------- &nbsp; _visualFields[2]_
139
+ - visualFields.vfplotplr() &nbsp; ----------- &nbsp; -- &nbsp; ----------- &nbsp; _visualFields[2]_
140
+ - visualFields.vflegoplot() &nbsp; ----------- &nbsp; -- &nbsp; ----------- &nbsp; _visualFields[2]_
141
+ - visualFields.vfsfa() &nbsp; ----------- &nbsp; Generates one-page report of single field analyses as a pdf file &nbsp; ----------- &nbsp; _visualFields[2]_ </br></br>
142
+ - currentNV = visualFields.getnv() &nbsp; ----------- &nbsp; get current normative environment/setting (NV) &nbsp; ----------- &nbsp; _visualFields[2]_
143
+ - visualFields.getallvalues() &nbsp; ----------- &nbsp; compute all td, pd, pdp, tdp, gl, gh,glp based on the current NV &nbsp; ----------- &nbsp; _visualFields[2]_
144
+ - visualFields.gettd() &nbsp; ----------- &nbsp; alias for getallvalues only to compute td &nbsp; ----------- &nbsp; _visualFields[2]_
145
+ - visualFields.getgl() &nbsp; ----------- &nbsp; alias for getallvalues only to compute gl &nbsp; ----------- &nbsp; _visualFields[2]_
146
+ - visualFields.gettdp() &nbsp; ----------- &nbsp; alias for getallvalues only to compute tdp &nbsp; ----------- &nbsp; _visualFields[2]_
147
+ - visualFields.getpd() &nbsp; ----------- &nbsp; alias for getallvalues only to compute pd &nbsp; ----------- &nbsp; _visualFields[2]_
148
+ - visualFields.getgh() &nbsp; ----------- &nbsp; alias for getallvalues only to compute gh &nbsp; ----------- &nbsp; _visualFields[2]_
149
+ - visualFields.getpdp() &nbsp; ----------- &nbsp; alias for getallvalues only to compute pdp &nbsp; ----------- &nbsp; _visualFields[2]_
150
+ - visualFields.getglp() &nbsp; ----------- &nbsp; alias for getallvalues only to compute gi &nbsp; ----------- &nbsp; _visualFields[2]_
151
+ - visualFields.get_info_normvals() &nbsp; ----------- &nbsp; Get all avialbale predefined normalization environments/settings &nbsp; ----------- &nbsp; _visualFields[2]_
152
+ - visualFields.setnv() &nbsp; ----------- &nbsp; change/set normalization environment based on a predefined NV &nbsp; ----------- &nbsp; _visualFields[2]_
153
+ - visualFields.nvgenerate &nbsp; ----------- &nbsp; generate a normalization environment based new data &nbsp; ----------- &nbsp; _visualFields[2]_</br></br>
154
+
155
+ - PyGlaucoMetrics.Fn_HAP2 &nbsp; ----------- &nbsp; determine glaucoma cases based on criteria: HAP2 &nbsp; ----------- &nbsp; PyGlaucoMetrics[3]_
156
+ - PyGlaucoMetrics.Fn_UKGTS &nbsp; ----------- &nbsp; determine glaucoma cases based on criteria: UKGTS &nbsp; ----------- &nbsp; PyGlaucoMetrics[3]_
157
+ - PyGlaucoMetrics.Fn_LoGTS &nbsp; ----------- &nbsp; determine glaucoma cases based on criteria: LoGTS &nbsp; ----------- &nbsp; PyGlaucoMetrics[3]_
158
+ - PyGlaucoMetrics.Fn_Foster &nbsp; ----------- &nbsp; determine glaucoma cases based on criteria: Foster &nbsp; ----------- &nbsp; PyGlaucoMetrics[3]_
159
+ - PyGlaucoMetrics.Fn_Kangs &nbsp; ----------- &nbsp; determine glaucoma cases based on criteria: Kangs &nbsp; ----------- &nbsp; PyGlaucoMetrics[3]_
160
+
161
+
162
+
163
+ ## Snapshots
164
+
165
+
166
+ <img src="./imgs/1_(12).png" width="50%">
167
+ <img src="./imgs/1_(11).png" width="50%">
168
+ <img src="./imgs/1_(1).png" width="50%">
169
+ <img src="./imgs/1_(2).png" width="50%">
170
+ <img src="./imgs/1_(3).png" width="50%">
171
+ <img src="./imgs/1_(4).png" width="50%">
172
+ <img src="./imgs/1_(5).png" width="50%">
173
+ <img src="./imgs/1_(10).png" width="50%">
174
+ <img src="./imgs/1_(6).png" width="50%">
175
+ <img src="./imgs/1_(8).png" width="50%">
176
+ <img src="./imgs/1_(14).png" width="50%">
177
+ <img src="./imgs/1_(13).png" width="50%">
178
+