PaIRS-UniNa 0.1.13__cp310-cp310-win_amd64.whl → 0.2.8__cp310-cp310-win_amd64.whl
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.
- PaIRS_UniNa/Calibration_Tab.py +331 -0
- PaIRS_UniNa/Changes.txt +134 -2
- PaIRS_UniNa/Custom_Top.py +299 -299
- PaIRS_UniNa/Explorer.py +3136 -0
- PaIRS_UniNa/FolderLoop.py +562 -0
- PaIRS_UniNa/Input_Tab.py +831 -0
- PaIRS_UniNa/Input_Tab_CalVi.py +786 -0
- PaIRS_UniNa/Input_Tab_tools.py +3025 -0
- PaIRS_UniNa/Log_Tab.py +57 -14
- PaIRS_UniNa/Output_Tab.py +922 -0
- PaIRS_UniNa/PaIRS_PIV.py +111 -18
- PaIRS_UniNa/PaIRS_pypacks.py +698 -140
- PaIRS_UniNa/Process_Tab.py +1221 -1402
- PaIRS_UniNa/Process_Tab_CalVi.py +137 -262
- PaIRS_UniNa/Process_Tab_Disp.py +163 -0
- PaIRS_UniNa/Process_Tab_Min.py +120 -0
- PaIRS_UniNa/Saving_tools.py +296 -0
- PaIRS_UniNa/TabTools.py +863 -543
- PaIRS_UniNa/Vis_Tab.py +1898 -1315
- PaIRS_UniNa/Vis_Tab_CalVi.py +484 -356
- PaIRS_UniNa/Whatsnew.py +59 -10
- PaIRS_UniNa/_PaIRS_PIV.pyd +0 -0
- PaIRS_UniNa/__init__.py +4 -3
- PaIRS_UniNa/addwidgets_ps.py +326 -56
- PaIRS_UniNa/calib.py +19 -12
- PaIRS_UniNa/calibView.py +48 -25
- PaIRS_UniNa/gPaIRS.py +3902 -3461
- PaIRS_UniNa/gPalette.py +189 -170
- PaIRS_UniNa/icons/align_all.png +0 -0
- PaIRS_UniNa/icons/announcement.png +0 -0
- PaIRS_UniNa/icons/automatic_levels_off.png +0 -0
- PaIRS_UniNa/icons/automatic_levels_on.png +0 -0
- PaIRS_UniNa/icons/automatic_off.png +0 -0
- PaIRS_UniNa/icons/automatic_on.png +0 -0
- PaIRS_UniNa/icons/automatic_size_off.png +0 -0
- PaIRS_UniNa/icons/automatic_size_on.png +0 -0
- PaIRS_UniNa/icons/bin_off.png +0 -0
- PaIRS_UniNa/icons/bin_on.png +0 -0
- PaIRS_UniNa/icons/brush_cursor.png +0 -0
- PaIRS_UniNa/icons/bugfix.png +0 -0
- PaIRS_UniNa/icons/cal_proc.png +0 -0
- PaIRS_UniNa/icons/cal_proc_off.png +0 -0
- PaIRS_UniNa/icons/cal_step.png +0 -0
- PaIRS_UniNa/icons/cal_step_off.png +0 -0
- PaIRS_UniNa/icons/calibration_logo.png +0 -0
- PaIRS_UniNa/icons/change_folder.png +0 -0
- PaIRS_UniNa/icons/change_folder_off.png +0 -0
- PaIRS_UniNa/icons/close_all.png +0 -0
- PaIRS_UniNa/icons/close_workspace.png +0 -0
- PaIRS_UniNa/icons/colormap.png +0 -0
- PaIRS_UniNa/icons/colormaps/Accent.png +0 -0
- PaIRS_UniNa/icons/colormaps/BrBG.png +0 -0
- PaIRS_UniNa/icons/colormaps/Dark2.png +0 -0
- PaIRS_UniNa/icons/colormaps/PRGn.png +0 -0
- PaIRS_UniNa/icons/colormaps/Paired.png +0 -0
- PaIRS_UniNa/icons/colormaps/Pastel1.png +0 -0
- PaIRS_UniNa/icons/colormaps/Pastel2.png +0 -0
- PaIRS_UniNa/icons/colormaps/PiYG.png +0 -0
- PaIRS_UniNa/icons/colormaps/PuOr.png +0 -0
- PaIRS_UniNa/icons/colormaps/RdBu.png +0 -0
- PaIRS_UniNa/icons/colormaps/RdGy.png +0 -0
- PaIRS_UniNa/icons/colormaps/RdYlBu.png +0 -0
- PaIRS_UniNa/icons/colormaps/RdYlGn.png +0 -0
- PaIRS_UniNa/icons/colormaps/Set1.png +0 -0
- PaIRS_UniNa/icons/colormaps/Set2.png +0 -0
- PaIRS_UniNa/icons/colormaps/Set3.png +0 -0
- PaIRS_UniNa/icons/colormaps/Spectral.png +0 -0
- PaIRS_UniNa/icons/colormaps/Wistia.png +0 -0
- PaIRS_UniNa/icons/colormaps/afmhot.png +0 -0
- PaIRS_UniNa/icons/colormaps/autumn.png +0 -0
- PaIRS_UniNa/icons/colormaps/binary.png +0 -0
- PaIRS_UniNa/icons/colormaps/blackVector.png +0 -0
- PaIRS_UniNa/icons/colormaps/blueVector.png +0 -0
- PaIRS_UniNa/icons/colormaps/bone.png +0 -0
- PaIRS_UniNa/icons/colormaps/brg.png +0 -0
- PaIRS_UniNa/icons/colormaps/bwr.png +0 -0
- PaIRS_UniNa/icons/colormaps/cividis.png +0 -0
- PaIRS_UniNa/icons/colormaps/cool.png +0 -0
- PaIRS_UniNa/icons/colormaps/coolwarm.png +0 -0
- PaIRS_UniNa/icons/colormaps/copper.png +0 -0
- PaIRS_UniNa/icons/colormaps/cubehelix.png +0 -0
- PaIRS_UniNa/icons/colormaps/cyanVector.png +0 -0
- PaIRS_UniNa/icons/colormaps/flag.png +0 -0
- PaIRS_UniNa/icons/colormaps/gist_heat.png +0 -0
- PaIRS_UniNa/icons/colormaps/gray.png +0 -0
- PaIRS_UniNa/icons/colormaps/greenVector.png +0 -0
- PaIRS_UniNa/icons/colormaps/hot.png +0 -0
- PaIRS_UniNa/icons/colormaps/hsv.png +0 -0
- PaIRS_UniNa/icons/colormaps/inferno.png +0 -0
- PaIRS_UniNa/icons/colormaps/jet.png +0 -0
- PaIRS_UniNa/icons/colormaps/magentaVector.png +0 -0
- PaIRS_UniNa/icons/colormaps/magma.png +0 -0
- PaIRS_UniNa/icons/colormaps/ocean.png +0 -0
- PaIRS_UniNa/icons/colormaps/pink.png +0 -0
- PaIRS_UniNa/icons/colormaps/plasma.png +0 -0
- PaIRS_UniNa/icons/colormaps/prism.png +0 -0
- PaIRS_UniNa/icons/colormaps/rainbow.png +0 -0
- PaIRS_UniNa/icons/colormaps/redVector.png +0 -0
- PaIRS_UniNa/icons/colormaps/seismic.png +0 -0
- PaIRS_UniNa/icons/colormaps/spring.png +0 -0
- PaIRS_UniNa/icons/colormaps/summer.png +0 -0
- PaIRS_UniNa/icons/colormaps/tab10.png +0 -0
- PaIRS_UniNa/icons/colormaps/tab20.png +0 -0
- PaIRS_UniNa/icons/colormaps/tab20b.png +0 -0
- PaIRS_UniNa/icons/colormaps/tab20c.png +0 -0
- PaIRS_UniNa/icons/colormaps/terrain.png +0 -0
- PaIRS_UniNa/icons/colormaps/twilight.png +0 -0
- PaIRS_UniNa/icons/colormaps/viridis.png +0 -0
- PaIRS_UniNa/icons/colormaps/whiteVector.png +0 -0
- PaIRS_UniNa/icons/colormaps/winter.png +0 -0
- PaIRS_UniNa/icons/colormaps/yellowVector.png +0 -0
- PaIRS_UniNa/icons/common_region.png +0 -0
- PaIRS_UniNa/icons/common_region_off.png +0 -0
- PaIRS_UniNa/icons/completed.png +0 -0
- PaIRS_UniNa/icons/contourf_off.png +0 -0
- PaIRS_UniNa/icons/contourf_on.png +0 -0
- PaIRS_UniNa/icons/copy.png +0 -0
- PaIRS_UniNa/icons/copy_process.png +0 -0
- PaIRS_UniNa/icons/copy_process_off.png +0 -0
- PaIRS_UniNa/icons/cut.png +0 -0
- PaIRS_UniNa/icons/cut_warnings.png +0 -0
- PaIRS_UniNa/icons/darkmode.png +0 -0
- PaIRS_UniNa/icons/disp_step.png +0 -0
- PaIRS_UniNa/icons/disp_step_off.png +0 -0
- PaIRS_UniNa/icons/edit_list.png +0 -0
- PaIRS_UniNa/icons/example_list.png +0 -0
- PaIRS_UniNa/icons/flaticon_PaIRS_beta.png +0 -0
- PaIRS_UniNa/icons/flaticon_PaIRS_download_warning.png +0 -0
- PaIRS_UniNa/icons/flip_y_off.png +0 -0
- PaIRS_UniNa/icons/flip_y_on.png +0 -0
- PaIRS_UniNa/icons/folder_loop_cleanup.png +0 -0
- PaIRS_UniNa/icons/folder_loop_cleanup_off.png +0 -0
- PaIRS_UniNa/icons/gear.gif +0 -0
- PaIRS_UniNa/icons/gear.png +0 -0
- PaIRS_UniNa/icons/import_set.png +0 -0
- PaIRS_UniNa/icons/information.png +0 -0
- PaIRS_UniNa/icons/input_logo.png +0 -0
- PaIRS_UniNa/icons/issue.png +0 -0
- PaIRS_UniNa/icons/laser_NTR.png +0 -0
- PaIRS_UniNa/icons/laser_TR_double.png +0 -0
- PaIRS_UniNa/icons/laser_TR_single.png +0 -0
- PaIRS_UniNa/icons/link.png +0 -0
- PaIRS_UniNa/icons/linked.png +0 -0
- PaIRS_UniNa/icons/log_logo.png +0 -0
- PaIRS_UniNa/icons/logo_opaco.png +0 -0
- PaIRS_UniNa/icons/measure.png +0 -0
- PaIRS_UniNa/icons/measure_off.png +0 -0
- PaIRS_UniNa/icons/min_proc.png +0 -0
- PaIRS_UniNa/icons/min_proc_off.png +0 -0
- PaIRS_UniNa/icons/min_step.png +0 -0
- PaIRS_UniNa/icons/min_step_off.png +0 -0
- PaIRS_UniNa/icons/new_workspace.png +0 -0
- PaIRS_UniNa/icons/open_image.png +0 -0
- PaIRS_UniNa/icons/open_new_window.png +0 -0
- PaIRS_UniNa/icons/open_result.png +0 -0
- PaIRS_UniNa/icons/open_workspace.png +0 -0
- PaIRS_UniNa/icons/output_logo.png +0 -0
- PaIRS_UniNa/icons/paste_above.png +0 -0
- PaIRS_UniNa/icons/paste_below.png +0 -0
- PaIRS_UniNa/icons/paused.png +0 -0
- PaIRS_UniNa/icons/piv_proc.png +0 -0
- PaIRS_UniNa/icons/piv_proc_off.png +0 -0
- PaIRS_UniNa/icons/piv_step.png +0 -0
- PaIRS_UniNa/icons/piv_step_off.png +0 -0
- PaIRS_UniNa/icons/process_logo.png +0 -0
- PaIRS_UniNa/icons/process_loop.png +0 -0
- PaIRS_UniNa/icons/project.png +0 -0
- PaIRS_UniNa/icons/pylog.png +0 -0
- PaIRS_UniNa/icons/python_warning.png +0 -0
- PaIRS_UniNa/icons/queue.png +0 -0
- PaIRS_UniNa/icons/read.png +0 -0
- PaIRS_UniNa/icons/read_list.png +0 -0
- PaIRS_UniNa/icons/reset.png +0 -0
- PaIRS_UniNa/icons/reset_levels.png +0 -0
- PaIRS_UniNa/icons/restore_undo.png +0 -0
- PaIRS_UniNa/icons/running.gif +0 -0
- PaIRS_UniNa/icons/running.png +0 -0
- PaIRS_UniNa/icons/running_warn.png +0 -0
- PaIRS_UniNa/icons/save_and_stop.png +0 -0
- PaIRS_UniNa/icons/save_cfg.png +0 -0
- PaIRS_UniNa/icons/saveas_workspace.png +0 -0
- PaIRS_UniNa/icons/scale_all.png +0 -0
- PaIRS_UniNa/icons/scale_down.png +0 -0
- PaIRS_UniNa/icons/scale_up.png +0 -0
- PaIRS_UniNa/icons/scan_list.png +0 -0
- PaIRS_UniNa/icons/scan_path.png +0 -0
- PaIRS_UniNa/icons/scan_path_loop.png +0 -0
- PaIRS_UniNa/icons/scan_path_loop_off.png +0 -0
- PaIRS_UniNa/icons/search.png +0 -0
- PaIRS_UniNa/icons/showIW_off.png +0 -0
- PaIRS_UniNa/icons/showIW_on.png +0 -0
- PaIRS_UniNa/icons/show_all.png +0 -0
- PaIRS_UniNa/icons/sort.png +0 -0
- PaIRS_UniNa/icons/sort_reversed.png +0 -0
- PaIRS_UniNa/icons/spiv_proc.png +0 -0
- PaIRS_UniNa/icons/spiv_proc_off.png +0 -0
- PaIRS_UniNa/icons/star.png +0 -0
- PaIRS_UniNa/icons/step_inheritance.png +0 -0
- PaIRS_UniNa/icons/subMIN_off.png +0 -0
- PaIRS_UniNa/icons/subMIN_on.png +0 -0
- PaIRS_UniNa/icons/unedited.png +0 -0
- PaIRS_UniNa/icons/uninitialized.png +0 -0
- PaIRS_UniNa/icons/unlink.png +0 -0
- PaIRS_UniNa/icons/unwrap_items.png +0 -0
- PaIRS_UniNa/icons/vectorColor.png +0 -0
- PaIRS_UniNa/icons/view.png +0 -0
- PaIRS_UniNa/icons/view_off.png +0 -0
- PaIRS_UniNa/icons/vis_logo.png +0 -0
- PaIRS_UniNa/icons/warning_circle.png +0 -0
- PaIRS_UniNa/icons/window.png +0 -0
- PaIRS_UniNa/icons/workspace.png +0 -0
- PaIRS_UniNa/icons/wrap_items.png +0 -0
- PaIRS_UniNa/icons/write_list.png +0 -0
- PaIRS_UniNa/listLib.py +303 -0
- PaIRS_UniNa/mtfPIV.py +8 -8
- PaIRS_UniNa/parForMulti.py +7 -5
- PaIRS_UniNa/parForWorkers.py +370 -31
- PaIRS_UniNa/pivParFor.py +233 -229
- PaIRS_UniNa/plt_util.py +141 -141
- PaIRS_UniNa/preProcParFor.py +153 -148
- PaIRS_UniNa/procTools.py +631 -178
- PaIRS_UniNa/readcfg.py +31 -1
- PaIRS_UniNa/rqrdpckgs.txt +9 -0
- PaIRS_UniNa/stereoPivParFor.py +227 -0
- PaIRS_UniNa/tAVarie.py +215 -215
- PaIRS_UniNa/tabSplitter.py +612 -0
- PaIRS_UniNa/ui_Calibration_Tab.py +545 -0
- PaIRS_UniNa/ui_Custom_Top.py +5 -5
- PaIRS_UniNa/ui_Input_Tab.py +1101 -0
- PaIRS_UniNa/{ui_Import_Tab_CalVi.py → ui_Input_Tab_CalVi.py} +1282 -1275
- PaIRS_UniNa/ui_Log_Tab.py +262 -257
- PaIRS_UniNa/{ui_Export_Tab.py → ui_Output_Tab.py} +2361 -1778
- PaIRS_UniNa/ui_Process_Tab.py +3809 -3758
- PaIRS_UniNa/ui_Process_Tab_CalVi.py +1547 -1546
- PaIRS_UniNa/ui_Process_Tab_Disp.py +1141 -0
- PaIRS_UniNa/ui_Process_Tab_Min.py +437 -0
- PaIRS_UniNa/ui_Vis_Tab.py +1626 -1208
- PaIRS_UniNa/ui_Vis_Tab_CalVi.py +1249 -1249
- PaIRS_UniNa/ui_Whatsnew.py +131 -131
- PaIRS_UniNa/ui_gPairs.py +876 -950
- PaIRS_UniNa/ui_infoPaIRS.py +550 -425
- PaIRS_UniNa/whatsnew.txt +6 -4
- {PaIRS_UniNa-0.1.13.dist-info → pairs_unina-0.2.8.dist-info}/METADATA +69 -51
- pairs_unina-0.2.8.dist-info/RECORD +329 -0
- {PaIRS_UniNa-0.1.13.dist-info → pairs_unina-0.2.8.dist-info}/WHEEL +1 -1
- PaIRS_UniNa/CalVi.py +0 -18
- PaIRS_UniNa/Export_Tab.py +0 -574
- PaIRS_UniNa/Import_Tab.py +0 -657
- PaIRS_UniNa/Import_Tab_CalVi.py +0 -861
- PaIRS_UniNa/Import_Tab_tools.py +0 -598
- PaIRS_UniNa/Tree_Tab.py +0 -543
- PaIRS_UniNa/gCalVi.py +0 -2024
- PaIRS_UniNa/icons/add.png +0 -0
- PaIRS_UniNa/icons/cancelled.png +0 -0
- PaIRS_UniNa/icons/chain.png +0 -0
- PaIRS_UniNa/icons/chain_broken.png +0 -0
- PaIRS_UniNa/icons/default_sizes.png +0 -0
- PaIRS_UniNa/icons/dock_tabs.png +0 -0
- PaIRS_UniNa/icons/done.png +0 -0
- PaIRS_UniNa/icons/down_arrow.png +0 -0
- PaIRS_UniNa/icons/export_logo.png +0 -0
- PaIRS_UniNa/icons/fast_delete.png +0 -0
- PaIRS_UniNa/icons/flip_y.png +0 -0
- PaIRS_UniNa/icons/ganci.png +0 -0
- PaIRS_UniNa/icons/import_blue.png +0 -0
- PaIRS_UniNa/icons/import_logo.png +0 -0
- PaIRS_UniNa/icons/missing.png +0 -0
- PaIRS_UniNa/icons/process_icon.png +0 -0
- PaIRS_UniNa/icons/processing.png +0 -0
- PaIRS_UniNa/icons/restart.png +0 -0
- PaIRS_UniNa/icons/right_arrow.png +0 -0
- PaIRS_UniNa/icons/run_piv.png +0 -0
- PaIRS_UniNa/icons/terminal.png +0 -0
- PaIRS_UniNa/icons/undock_tabs.png +0 -0
- PaIRS_UniNa/icons/vect_field.png +0 -0
- PaIRS_UniNa/icons/w0.png +0 -0
- PaIRS_UniNa/icons/w1.png +0 -0
- PaIRS_UniNa/icons/w2.png +0 -0
- PaIRS_UniNa/icons/w3.png +0 -0
- PaIRS_UniNa/icons/w4.png +0 -0
- PaIRS_UniNa/icons/w5.png +0 -0
- PaIRS_UniNa/run_CalVi.py +0 -14
- PaIRS_UniNa/run_gcalvi.py +0 -5
- PaIRS_UniNa/ui_Import_Tab.py +0 -1077
- PaIRS_UniNa/ui_Tree_Tab.py +0 -684
- PaIRS_UniNa/ui_gCalVi.py +0 -640
- PaIRS_UniNa/ui_infoCalVi.py +0 -428
- PaIRS_UniNa-0.1.13.dist-info/LICENSE +0 -19
- PaIRS_UniNa-0.1.13.dist-info/RECORD +0 -174
- /PaIRS_UniNa/icons/{clean_queue.png → clean.png} +0 -0
- /PaIRS_UniNa/icons/{waiting_c.png → sandglass.png} +0 -0
- {PaIRS_UniNa-0.1.13.dist-info → pairs_unina-0.2.8.dist-info}/top_level.txt +0 -0
PaIRS_UniNa/Process_Tab_CalVi.py
CHANGED
|
@@ -55,23 +55,56 @@ CorrMod_Cyl_order=[i for i in range(len(CorrMod_Cyl_items))] #************ chang
|
|
|
55
55
|
|
|
56
56
|
|
|
57
57
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
58
|
+
spin_tips={
|
|
59
|
+
'DotThresh' : 'Threshold on maximum/minimum value for search of control points',
|
|
60
|
+
'DotDiam' : 'Dot diameter in pixels (search radius is 2.5 times this value)',
|
|
61
|
+
'DotDx' : 'Spacing of dots along x on each level of the target',
|
|
62
|
+
'DotDy' : 'Spacing of dots along y on each level of the target',
|
|
63
|
+
'OriginXShift' : 'Shift of the origin along x on the second level of the target',
|
|
64
|
+
'OriginYShift' : 'Shift of the origin along y on the second level of the target',
|
|
65
|
+
'OriginZShift' : 'Shift of the origin along z on the second level of the target',
|
|
66
|
+
'XDeg' : 'Degree of polynomial along x',
|
|
67
|
+
'YDeg' : 'Degree of polynomial along y',
|
|
68
|
+
'ZDeg' : 'Degree of polynomial along z',
|
|
69
|
+
'PixAR' : 'Pixel aspect ratio (y/x)',
|
|
70
|
+
'PixPitch' : 'Pixel pitch in millimeter units',
|
|
71
|
+
'CylRad' : 'Initial value for cylinder internal radius in mm',
|
|
72
|
+
'CylThick' : 'Initial value for cylinder wall thickness in mm',
|
|
73
|
+
'CylNRatio' : 'Refractive index ratio (fluid/solid wall)',
|
|
74
|
+
}
|
|
75
|
+
check_tips={
|
|
76
|
+
'Plane' : 'Optimize the plane constants',
|
|
77
|
+
'Pinhole' : 'Optimize the pinhole parameters',
|
|
78
|
+
'SaveLOS' : 'Save physical coordinates of the intersections of the lines of sight with the cylinder',
|
|
79
|
+
}
|
|
80
|
+
radio_tips={}
|
|
81
|
+
line_edit_tips={}
|
|
82
|
+
button_tips={
|
|
83
|
+
'DotColor' : 'White/black dot in the image',
|
|
84
|
+
'tool_CollapBox_Target' : 'Graphics',
|
|
85
|
+
'CollapBox_Target' : 'Graphics',
|
|
86
|
+
'tool_CollapBox_CalPar' : 'Graphics',
|
|
87
|
+
'CollapBox_CalPar' : 'Graphics',
|
|
88
|
+
}
|
|
89
|
+
combo_tips={
|
|
90
|
+
'DotTypeSearch' : 'Type of search for control points',
|
|
91
|
+
'TargetType' : 'Type of target (single or double plane)',
|
|
92
|
+
'CalibProcType' : 'Type of calibration procedure',
|
|
93
|
+
'CamMod' : 'Type of mapping function',
|
|
94
|
+
'CorrMod' : 'Parameters of the correction to be optimized',
|
|
95
|
+
'CorrMod_Cyl' : 'Cylinder parameters of the correction to be optimized',
|
|
96
|
+
}
|
|
66
97
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
self.surname='PROCESS_Tab_CalVi'
|
|
98
|
+
class PROpar_CalVi(TABpar):
|
|
99
|
+
def __init__(self,Process=ProcessTypes.null,Step=StepTypes.null):
|
|
100
|
+
self.setup(Process,Step)
|
|
101
|
+
super().__init__('PROpar_CalVi','Process_CalVi')
|
|
72
102
|
self.unchecked_fields+=['FlagTarget_reset','FlagCalib_reset']
|
|
73
103
|
|
|
74
|
-
def setup(self):
|
|
104
|
+
def setup(self,Process,Step):
|
|
105
|
+
self.Process = Process
|
|
106
|
+
self.Step = Step
|
|
107
|
+
|
|
75
108
|
#***Dot
|
|
76
109
|
self.DotColor=0
|
|
77
110
|
self.DotTypeSearch=0
|
|
@@ -116,32 +149,23 @@ class Process_Tab_CalVi(gPaIRS_Tab):
|
|
|
116
149
|
class Process_Tab_Signals(gPaIRS_Tab.Tab_Signals):
|
|
117
150
|
pass
|
|
118
151
|
|
|
119
|
-
def __init__(self
|
|
120
|
-
parent=None
|
|
121
|
-
flagInit=True
|
|
122
|
-
if len(args): parent=args[0]
|
|
123
|
-
if len(args)>1: flagInit=args[1]
|
|
152
|
+
def __init__(self,parent: QWidget =None, flagInit= __name__ == "__main__"):
|
|
124
153
|
super().__init__(parent,Ui_ProcessTab_CalVi,PROpar_CalVi)
|
|
125
154
|
self.signals=self.Process_Tab_Signals(self)
|
|
126
155
|
|
|
127
156
|
#------------------------------------- Graphical interface: widgets
|
|
157
|
+
self.TABname='Process_CalVi'
|
|
128
158
|
self.ui: Ui_ProcessTab_CalVi
|
|
129
|
-
ui=self.ui
|
|
130
159
|
|
|
131
160
|
#necessary to change the name and the order of the items
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
c.clear()
|
|
141
|
-
for i in orderCombo:
|
|
142
|
-
c.addItem(itemsCombo[i])
|
|
143
|
-
|
|
144
|
-
self.setupWid() #---------------- IMPORTANT
|
|
161
|
+
for g in list(globals()):
|
|
162
|
+
if '_items' in g or '_ord' in g or '_tips' in g:
|
|
163
|
+
#pri.Info.blue(f'Adding {g} to {self.name_tab}')
|
|
164
|
+
setattr(self,g,eval(g))
|
|
165
|
+
|
|
166
|
+
if __name__ == "__main__":
|
|
167
|
+
self.app=app
|
|
168
|
+
setAppGuiPalette(self)
|
|
145
169
|
|
|
146
170
|
#------------------------------------- Graphical interface: miscellanea
|
|
147
171
|
self.Flag_CYLINDERCAL_option=None
|
|
@@ -151,10 +175,18 @@ class Process_Tab_CalVi(gPaIRS_Tab):
|
|
|
151
175
|
self.PROpar_base=PROpar_CalVi()
|
|
152
176
|
self.PROpar:PROpar_CalVi=self.TABpar
|
|
153
177
|
self.PROpar_old:PROpar_CalVi=self.TABpar_old
|
|
154
|
-
self.defineSetTABpar(self.setPROpar)
|
|
155
178
|
|
|
156
179
|
#------------------------------------- Callbacks
|
|
157
|
-
self.
|
|
180
|
+
self.defineWidgets()
|
|
181
|
+
self.setupWid() #---------------- IMPORTANT
|
|
182
|
+
|
|
183
|
+
self.defineCallbacks()
|
|
184
|
+
self.connectCallbacks()
|
|
185
|
+
|
|
186
|
+
self.defineSettings()
|
|
187
|
+
|
|
188
|
+
self.adjustTABpar=self.adjustPROpar
|
|
189
|
+
self.setTABlayout=self.setPROlayout
|
|
158
190
|
|
|
159
191
|
#------------------------------------- Initializing
|
|
160
192
|
if flagInit:
|
|
@@ -162,200 +194,37 @@ class Process_Tab_CalVi(gPaIRS_Tab):
|
|
|
162
194
|
|
|
163
195
|
|
|
164
196
|
def initialize(self):
|
|
165
|
-
pri.Info.yellow(f'{"*"*20} PROCESS initialization {"*"*20}')
|
|
166
|
-
self.setTABpar(True)
|
|
197
|
+
pri.Info.yellow(f'{"*"*20} PROCESS CalVi initialization {"*"*20}')
|
|
198
|
+
self.setTABpar(FlagAdjustPar=True,FlagBridge=False)
|
|
199
|
+
self.add_TABpar('initialization')
|
|
200
|
+
self.setFocus()
|
|
201
|
+
|
|
202
|
+
#*************************************************** Adjusting parameters
|
|
203
|
+
def adjustPROpar(self):
|
|
204
|
+
if self.PROpar.CalibProcType!=self.PROpar_old.CalibProcType:
|
|
205
|
+
if self.PROpar.CalibProcType==0:
|
|
206
|
+
self.PROpar.FlagPlane=True
|
|
207
|
+
elif self.PROpar.CalibProcType==3:
|
|
208
|
+
self.PROpar.FlagPlane=False
|
|
209
|
+
self.PROpar.FlagPinhole=False
|
|
210
|
+
self.adjustCalibProcType()
|
|
211
|
+
self.adjustCorrMod()
|
|
167
212
|
|
|
168
|
-
def setupCallbacks(self):
|
|
169
|
-
#Callbacks
|
|
170
213
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
'OriginXShift',
|
|
176
|
-
'OriginYShift',
|
|
177
|
-
'OriginZShift',
|
|
178
|
-
'XDeg',
|
|
179
|
-
'YDeg',
|
|
180
|
-
'ZDeg',
|
|
181
|
-
'PixAR',
|
|
182
|
-
'PixPitch',
|
|
183
|
-
'CylRad',
|
|
184
|
-
'CylThick',
|
|
185
|
-
'CylNRatio'
|
|
186
|
-
]
|
|
187
|
-
spin_tips=['Threshold on maximum/minimum value for search of control points',
|
|
188
|
-
'Dot diameter in pixels (search radius is 2.5 times this value)',
|
|
189
|
-
'Spacing of dots along x on each level of the target',
|
|
190
|
-
'Spacing of dots along y on each level of the target',
|
|
191
|
-
'Shift of the origin along x on the second level of the target',
|
|
192
|
-
'Shift of the origin along y on the second level of the target',
|
|
193
|
-
'Shift of the origin along z on the second level of the target',
|
|
194
|
-
'Degree of polynomial along x',
|
|
195
|
-
'Degree of polynomial along y',
|
|
196
|
-
'Degree of polynomial along z',
|
|
197
|
-
'Pixel aspect ratio (y/x)',
|
|
198
|
-
'Pixel pitch in millimeter units',
|
|
199
|
-
'Initial value for cylinder internal radius in mm',
|
|
200
|
-
'Initial value for cylinder wall thickness in mm',
|
|
201
|
-
'Refractive index ratio (fluid/solid wall)'
|
|
202
|
-
]
|
|
203
|
-
self.defineSpinCallbacks()
|
|
204
|
-
self.setSpinCallbacks(spin_names,spin_tips)
|
|
205
|
-
|
|
206
|
-
self.defineCheckCallbacks()
|
|
207
|
-
self.defineComboCallbacks()
|
|
208
|
-
|
|
209
|
-
signals=[["clicked"], #button
|
|
210
|
-
["toggled"], #check
|
|
211
|
-
["activated"], #combo #"currentIndexChanged" #***** rimpiazzare?
|
|
212
|
-
]
|
|
213
|
-
fields=["button",
|
|
214
|
-
"check",
|
|
215
|
-
"combo",
|
|
216
|
-
]
|
|
217
|
-
names=[ ['DotColor'], #button
|
|
218
|
-
['Plane',
|
|
219
|
-
'Pinhole',
|
|
220
|
-
'SaveLOS'], #check
|
|
221
|
-
['DotTypeSearch',
|
|
222
|
-
'TargetType',
|
|
223
|
-
'CalibProcType',
|
|
224
|
-
'CamMod',
|
|
225
|
-
'CorrMod',
|
|
226
|
-
'CorrMod_Cyl'], #combo
|
|
227
|
-
]
|
|
228
|
-
tips=[ ['White/black dot in the image'], #button
|
|
229
|
-
['Optimize the plane constants',
|
|
230
|
-
'Optimize the pinhole parameters',
|
|
231
|
-
'Save physical coordinates of the intersections of the lines of sight with the cylinder'], #check
|
|
232
|
-
['Type of search for control points',
|
|
233
|
-
'Type of target (single or double plane)',
|
|
234
|
-
'Type of calibration procedure',
|
|
235
|
-
'Type of mapping function',
|
|
236
|
-
'Parameters of the correction to be optimized',
|
|
237
|
-
'Cylinder parameters of the correction to be optimized'], #combo
|
|
238
|
-
]
|
|
239
|
-
|
|
240
|
-
for f,N,S,T in zip(fields,names,signals,tips):
|
|
241
|
-
for n,t in zip(N,T):
|
|
242
|
-
wid=getattr(self.ui,f+"_"+n)
|
|
243
|
-
fcallback=getattr(self,f+"_"+n+"_callback")
|
|
244
|
-
fcallbackWrapped=self.addParWrapper(fcallback,t)
|
|
245
|
-
for s in S:
|
|
246
|
-
sig=getattr(wid,s)
|
|
247
|
-
sig.connect(fcallbackWrapped)
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
def defineSpinCallbacks(self):
|
|
251
|
-
spins=self.findChildren(MyQSpin)+self.findChildren(MyQDoubleSpin)
|
|
252
|
-
for c in spins:
|
|
253
|
-
c:MyQSpin
|
|
254
|
-
nameSpin=c.objectName().split('spin_')[-1]
|
|
255
|
-
def createCallback(nameSpin):
|
|
256
|
-
def callbackFun():
|
|
257
|
-
setattr(self.PROpar,nameSpin,getattr(self.ui,'spin_'+nameSpin).value())
|
|
258
|
-
return callbackFun
|
|
259
|
-
setattr(self,'spin_'+nameSpin+'_callback',createCallback(nameSpin))
|
|
260
|
-
|
|
261
|
-
def defineCheckCallbacks(self):
|
|
262
|
-
checks=self.findChildren(QCheckBox)
|
|
263
|
-
for c in checks:
|
|
264
|
-
c:QCheckBox
|
|
265
|
-
nameCheck=c.objectName().split('check_')[-1]
|
|
266
|
-
def createCallback(nameCheck):
|
|
267
|
-
def callbackFun():
|
|
268
|
-
setattr(self.PROpar,'Flag'+nameCheck,getattr(self.ui,'check_'+nameCheck).isChecked())
|
|
269
|
-
if hasattr(self,'check_'+nameCheck+'_action'):
|
|
270
|
-
fun=getattr(self,'check_'+nameCheck+'_action')
|
|
271
|
-
fun()
|
|
272
|
-
return callbackFun
|
|
273
|
-
setattr(self,'check_'+nameCheck+'_callback',createCallback(nameCheck))
|
|
274
|
-
|
|
275
|
-
def defineComboCallbacks(self):
|
|
276
|
-
combos=self.findChildren(QComboBox)
|
|
277
|
-
for c in combos:
|
|
278
|
-
c:QComboBox
|
|
279
|
-
nameCombo=c.objectName().split('combo_')[-1]
|
|
280
|
-
def createCallback(nameCombo):
|
|
281
|
-
def callbackFun():
|
|
282
|
-
itemText=getattr(self.ui,'combo_'+nameCombo).currentText()
|
|
283
|
-
itemsCombo=eval(nameCombo+'_items')
|
|
284
|
-
setattr(self.PROpar,nameCombo,itemsCombo.index(itemText))
|
|
285
|
-
if hasattr(self,'combo_'+nameCombo+'_action'):
|
|
286
|
-
fun=getattr(self,'combo_'+nameCombo+'_action')
|
|
287
|
-
fun()
|
|
288
|
-
return callbackFun
|
|
289
|
-
setattr(self,'combo_'+nameCombo+'_callback',createCallback(nameCombo))
|
|
290
|
-
|
|
291
|
-
#*************************************************** Target parameters callbacks
|
|
292
|
-
def button_DotColor_callback(self):
|
|
293
|
-
if self.ui.button_DotColor.text()==DotColor_labels[0]: self.PROpar.DotColor=1
|
|
294
|
-
else: self.PROpar.DotColor=0
|
|
295
|
-
|
|
296
|
-
#*************************************************** Calibration parameters callbacks (action)
|
|
297
|
-
def combo_CalibProcType_action(self):
|
|
298
|
-
if self.PROpar.CalibProcType in (1,2):
|
|
299
|
-
self.PROpar.FlagPlane=1
|
|
300
|
-
|
|
301
|
-
if self.PROpar.CalibProcType in (0,1):
|
|
302
|
-
self.PROpar.FlagPinhole=1
|
|
303
|
-
elif self.PROpar.CalibProcType==2:
|
|
304
|
-
self.PROpar.FlagPinhole=0
|
|
305
|
-
|
|
306
|
-
if self.PROpar.CalibProcType in (1,2) and self.PROpar.CamMod!=3:
|
|
307
|
-
self.PROpar.CamMod=3
|
|
308
|
-
elif self.PROpar.CalibProcType==3:
|
|
309
|
-
self.PROpar.CamMod=4
|
|
310
|
-
self.combo_CamMod_action()
|
|
311
|
-
if self.father:
|
|
312
|
-
self.father.w_Import.check_cams()
|
|
313
|
-
|
|
314
|
-
def combo_CamMod_action(self):
|
|
315
|
-
if not(self.PROpar.CalibProcType==0 and self.PROpar.CamMod==4) and self.PROpar.CorrMod>2:
|
|
316
|
-
self.PROpar.CorrMod=2
|
|
317
|
-
|
|
318
|
-
def check_SaveLOS_action(self):
|
|
319
|
-
if self.ui.check_SaveLOS.isChecked():
|
|
320
|
-
warningDialog(self,'Please notice that the feature to save the lines-of-sight (LOS) data to the disk is not currently available!\n\nContact the authors via email if interested.')
|
|
214
|
+
#*************************************************** Layout
|
|
215
|
+
def setPROlayout(self):
|
|
216
|
+
#pri.Time.blue(1,'setPROpar: Beginning')
|
|
217
|
+
self.ui.w_DoublePlane.setVisible(self.PROpar.TargetType!=0)
|
|
321
218
|
|
|
322
|
-
#*************************************************** From Parameters to UI
|
|
323
|
-
def setCYLPARDebug(self):
|
|
324
|
-
#combo_CalibProcType
|
|
325
|
-
self.ui.combo_CalibProcType.clear()
|
|
326
|
-
if self.Flag_CYLINDERCAL: l=len(CalibProcType_items)
|
|
327
|
-
else: l=len(CalibProcType_items)-1
|
|
328
|
-
for it in CalibProcType_items[:l]:
|
|
329
|
-
self.ui.combo_CalibProcType.addItem(it)
|
|
330
219
|
if bool(self.Flag_CYLINDERCAL_option):
|
|
331
220
|
self.Flag_CYLINDERCAL_option.setEnabled(self.PROpar.CalibProcType!=3)
|
|
332
221
|
|
|
333
|
-
def setPROpar(self):
|
|
334
|
-
#pri.Time.blue(1,'setPROpar: Beginning')
|
|
335
|
-
if self.PROpar.TargetType==0:
|
|
336
|
-
self.ui.w_DoublePlane.hide()
|
|
337
|
-
else:
|
|
338
|
-
self.ui.w_DoublePlane.show()
|
|
339
|
-
|
|
340
|
-
self.setCYLPARDebug()
|
|
341
|
-
|
|
342
222
|
#check_Plane
|
|
343
|
-
if self.PROpar.CalibProcType==0
|
|
344
|
-
|
|
345
|
-
else:
|
|
346
|
-
self.ui.check_Plane.setText('Opt. plane const.')
|
|
347
|
-
if self.PROpar.CalibProcType in (1,2):
|
|
348
|
-
self.ui.check_Plane.setChecked(True)
|
|
349
|
-
self.ui.check_Plane.setEnabled(False)
|
|
350
|
-
else:
|
|
351
|
-
self.ui.check_Plane.setEnabled(True)
|
|
223
|
+
self.ui.check_Plane.setText(f'{"Show" if self.PROpar.CalibProcType==0 else "Opt."} plane const.')
|
|
224
|
+
self.ui.check_Plane.setEnabled(self.PROpar.CalibProcType not in (1,2))
|
|
352
225
|
|
|
353
226
|
#check_Pinhole
|
|
354
|
-
|
|
355
|
-
self.ui.check_Pinhole.setChecked(self.PROpar.CalibProcType<2)
|
|
356
|
-
self.ui.check_Pinhole.setEnabled(False)
|
|
357
|
-
else:
|
|
358
|
-
self.ui.check_Pinhole.setEnabled(True)
|
|
227
|
+
self.ui.check_Pinhole.setEnabled(self.PROpar.CalibProcType==3)
|
|
359
228
|
|
|
360
229
|
#combo_CamMod
|
|
361
230
|
self.ui.combo_CamMod.clear()
|
|
@@ -372,59 +241,65 @@ class Process_Tab_CalVi(gPaIRS_Tab):
|
|
|
372
241
|
self.ui.combo_CamMod.setEnabled(flagEnabled)
|
|
373
242
|
|
|
374
243
|
#stacked_Widget
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
self.ui.w_CamMod_par.setCurrentIndex(1)
|
|
381
|
-
self.ui.check_Plane.setVisible(True)
|
|
382
|
-
self.ui.check_Pinhole.setVisible(True)
|
|
383
|
-
|
|
384
|
-
if self.PROpar.CamMod>=3 and not self.PROpar.FlagPinhole:
|
|
385
|
-
self.ui.w_CamMod_par.setEnabled(False)
|
|
386
|
-
else:
|
|
387
|
-
self.ui.w_CamMod_par.setEnabled(True)
|
|
244
|
+
FlagCamMod=self.PROpar.CamMod>=3
|
|
245
|
+
self.ui.w_CamMod_par.setCurrentIndex(int(FlagCamMod))
|
|
246
|
+
self.ui.check_Plane.setVisible(FlagCamMod)
|
|
247
|
+
self.ui.check_Pinhole.setVisible(FlagCamMod)
|
|
248
|
+
self.ui.w_CamMod_par.setEnabled(self.PROpar.CamMod < 3 or self.PROpar.FlagPinhole)
|
|
388
249
|
|
|
389
250
|
#combo_corrMod
|
|
390
251
|
self.ui.w_CylPar.setVisible(self.PROpar.CamMod==4)
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
self.ui.combo_CorrMod.show()
|
|
396
|
-
self.ui.label_CorrMod.show()
|
|
397
|
-
|
|
252
|
+
FlagCorrMod=self.PROpar.CamMod >= 3 and self.PROpar.FlagPinhole
|
|
253
|
+
self.ui.combo_CorrMod.setVisible(FlagCorrMod)
|
|
254
|
+
self.ui.label_CorrMod.setVisible(FlagCorrMod)
|
|
255
|
+
if FlagCorrMod:
|
|
398
256
|
self.ui.combo_CorrMod.clear()
|
|
399
257
|
if self.PROpar.CalibProcType==0 and self.PROpar.CamMod==4: l=len(CorrMod_items)
|
|
400
258
|
else: l=3
|
|
401
259
|
for it in CorrMod_items[:l]:
|
|
402
|
-
self.ui.combo_CorrMod.addItem(it)
|
|
260
|
+
self.ui.combo_CorrMod.addItem(it)
|
|
261
|
+
self.ui.w_CalibProc_Cyl.setVisible(self.PROpar.CalibProcType==3)
|
|
262
|
+
|
|
263
|
+
#*************************************************** Target parameters
|
|
264
|
+
#******************** Actions
|
|
265
|
+
def button_DotColor_action(self):
|
|
266
|
+
if self.ui.button_DotColor.text()==DotColor_labels[0]: self.PROpar.DotColor=1
|
|
267
|
+
else: self.PROpar.DotColor=0
|
|
268
|
+
|
|
269
|
+
#******************** Settings
|
|
270
|
+
def button_DotColor_set(self):
|
|
271
|
+
self.ui.button_DotColor.setText(DotColor_labels[self.PROpar.DotColor])
|
|
272
|
+
|
|
273
|
+
#*************************************************** Calibration parameters
|
|
274
|
+
#******************** Actions
|
|
275
|
+
def check_SaveLOS_action(self):
|
|
276
|
+
if self.ui.check_SaveLOS.isChecked():
|
|
277
|
+
warningDialog(self,'Please notice that the feature to save the lines-of-sight (LOS) data to the disk is not currently available!\n\nContact the authors via email if interested.')
|
|
278
|
+
|
|
279
|
+
#******************** Adjusting
|
|
280
|
+
def adjustCalibProcType(self):
|
|
281
|
+
if self.PROpar.CalibProcType in (1,2):
|
|
282
|
+
self.PROpar.FlagPlane=True
|
|
403
283
|
|
|
404
284
|
if self.PROpar.CalibProcType!=3:
|
|
405
|
-
self.
|
|
406
|
-
else:
|
|
407
|
-
self.ui.w_CalibProc_Cyl.show()
|
|
285
|
+
self.PROpar.FlagPinhole=self.PROpar.CalibProcType<2
|
|
408
286
|
|
|
287
|
+
if self.PROpar.CalibProcType in (1,2) and self.PROpar.CamMod!=3:
|
|
288
|
+
self.PROpar.CamMod=3
|
|
289
|
+
elif self.PROpar.CalibProcType==3:
|
|
290
|
+
self.PROpar.CamMod=4
|
|
409
291
|
|
|
410
|
-
|
|
411
|
-
self.
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
b:QComboBox
|
|
422
|
-
nameCombo=b.objectName().split('combo_')[-1]
|
|
423
|
-
items=[b.itemText(i) for i in range(b.count())]
|
|
424
|
-
itemsCombo=eval(nameCombo+'_items')
|
|
425
|
-
b.setCurrentIndex(items.index(itemsCombo[getattr(self.PROpar,nameCombo)]))
|
|
426
|
-
#pri.Time.blue(0,'setPROpar: end')
|
|
427
|
-
|
|
292
|
+
def adjustCorrMod(self):
|
|
293
|
+
if not(self.PROpar.CalibProcType==0 and self.PROpar.CamMod==4) and self.PROpar.CorrMod>2:
|
|
294
|
+
self.PROpar.CorrMod=2
|
|
295
|
+
|
|
296
|
+
#*************************************************** From Parameters to UI
|
|
297
|
+
def setCYLPARDebug(self):
|
|
298
|
+
self.ui.combo_CalibProcType.clear()
|
|
299
|
+
if self.Flag_CYLINDERCAL: l=len(CalibProcType_items)
|
|
300
|
+
else: l=len(CalibProcType_items)-1
|
|
301
|
+
for it in CalibProcType_items[:l]:
|
|
302
|
+
self.ui.combo_CalibProcType.addItem(it)
|
|
428
303
|
|
|
429
304
|
if __name__ == "__main__":
|
|
430
305
|
import sys
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
from .ui_Process_Tab_Disp import*
|
|
2
|
+
from .TabTools import*
|
|
3
|
+
from .Process_Tab import Process_Tab
|
|
4
|
+
|
|
5
|
+
spin_tips={
|
|
6
|
+
'Nit' : 'Number of iterations',
|
|
7
|
+
'order' : 'Kernel width for image interpolation',
|
|
8
|
+
'SemiWidth_Epipolar' : 'Semi-width normal to epipolar line',
|
|
9
|
+
'Filter_SemiWidth' : 'Semi-width of filter',
|
|
10
|
+
'Threshold' : 'Threshold for disparity computation',
|
|
11
|
+
'Nit_OutDet' : 'Number of iterations for outlier detection',
|
|
12
|
+
'Std_Threshold' : 'S.t.d. threshold for disparity validation',
|
|
13
|
+
}
|
|
14
|
+
check_tips={}
|
|
15
|
+
radio_tips={}
|
|
16
|
+
line_edit_tips={
|
|
17
|
+
'IW' : 'IW sizes and/or spacings',
|
|
18
|
+
}
|
|
19
|
+
button_tips={
|
|
20
|
+
'tool_CollapBox_FinIt' : 'Graphics',
|
|
21
|
+
'CollapBox_FinIt' : 'Graphics',
|
|
22
|
+
'tool_CollapBox_Interp' : 'Graphics',
|
|
23
|
+
'CollapBox_Interp' : 'Graphics',
|
|
24
|
+
'tool_CollapBox_Interp_2' : 'Graphics',
|
|
25
|
+
'CollapBox_Interp_2' : 'Graphics',
|
|
26
|
+
}
|
|
27
|
+
combo_tips={
|
|
28
|
+
'ImInt' : 'Image interpolation',
|
|
29
|
+
'par_pol' : 'Polynomial interpolation',
|
|
30
|
+
'par_imshift' : 'Moving window',
|
|
31
|
+
'frames' : 'Use frame 1/2',
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
class PROpar_Disp(TABpar):
|
|
35
|
+
def __init__(self,Process=ProcessTypes.null,Step=StepTypes.null):
|
|
36
|
+
self.setup(Process,Step)
|
|
37
|
+
super().__init__('PROpar_Disp','PROCESS_Tab_Disp')
|
|
38
|
+
self.unchecked_fields+=[]
|
|
39
|
+
|
|
40
|
+
def setup(self,Process,Step):
|
|
41
|
+
self.Process = Process
|
|
42
|
+
self.Step = Step
|
|
43
|
+
|
|
44
|
+
self.Nit = 5
|
|
45
|
+
self.frames = 1
|
|
46
|
+
self.IntIniz = 57
|
|
47
|
+
self.IntIniz_ind_list = [3,1,2]
|
|
48
|
+
self.Vect =[256,128,256,128]
|
|
49
|
+
|
|
50
|
+
self.SemiWidth_Epipolar = 40
|
|
51
|
+
self.Filter_SemiWidth = 10
|
|
52
|
+
self.Threshold = 0.5
|
|
53
|
+
|
|
54
|
+
self.Nit_OutDet = 5
|
|
55
|
+
self.Std_Threshold = 3.0
|
|
56
|
+
|
|
57
|
+
class Process_Tab_Disp(gPaIRS_Tab):
|
|
58
|
+
class Process_Tab_Signals(gPaIRS_Tab.Tab_Signals):
|
|
59
|
+
pass
|
|
60
|
+
|
|
61
|
+
def __init__(self,parent: QWidget =None, flagInit= __name__ == "__main__"):
|
|
62
|
+
pri.Time.yellow('Process Disp: init')
|
|
63
|
+
super().__init__(parent,Ui_ProcessTab_Disp,PROpar_Disp)
|
|
64
|
+
self.signals=self.Process_Tab_Signals(self)
|
|
65
|
+
pri.Time.yellow('Process Disp: ui')
|
|
66
|
+
|
|
67
|
+
#------------------------------------- Graphical interface: widgets
|
|
68
|
+
self.TABname='Process_Disp'
|
|
69
|
+
self.ui: Ui_ProcessTab_Disp
|
|
70
|
+
|
|
71
|
+
#necessary to change the name and the order of the items
|
|
72
|
+
for g in list(globals()):
|
|
73
|
+
if '_items' in g or '_ord' in g or '_tips' in g:
|
|
74
|
+
#pri.Info.blue(f'Adding {g} to {self.name_tab}')
|
|
75
|
+
setattr(self,g,eval(g))
|
|
76
|
+
|
|
77
|
+
pri.Time.yellow('Process Disp: globals')
|
|
78
|
+
|
|
79
|
+
if __name__ == "__main__":
|
|
80
|
+
self.app=app
|
|
81
|
+
setAppGuiPalette(self)
|
|
82
|
+
|
|
83
|
+
pri.Time.yellow('Process Disp: setupWid')
|
|
84
|
+
|
|
85
|
+
#------------------------------------- Declaration of parameters
|
|
86
|
+
self.PROpar_base=PROpar_Disp()
|
|
87
|
+
self.PROpar:PROpar_Disp=self.TABpar
|
|
88
|
+
self.PROpar_old:PROpar_Disp=self.TABpar_old
|
|
89
|
+
|
|
90
|
+
pri.Time.yellow('Process Disp: par')
|
|
91
|
+
|
|
92
|
+
#------------------------------------- Callbacks
|
|
93
|
+
self.defineWidgets()
|
|
94
|
+
self.setupWid() #---------------- IMPORTANT
|
|
95
|
+
|
|
96
|
+
Process_Tab.defineInterpActions(self)
|
|
97
|
+
self.defineCallbacks()
|
|
98
|
+
self.connectCallbacks()
|
|
99
|
+
|
|
100
|
+
Process_Tab.defineInterpSet(self)
|
|
101
|
+
self.defineSettings()
|
|
102
|
+
|
|
103
|
+
self.adjustTABpar=self.adjustPROpar
|
|
104
|
+
self.setTABlayout=self.setPROlayout
|
|
105
|
+
|
|
106
|
+
pri.Time.yellow('Process Disp: define callbacks')
|
|
107
|
+
|
|
108
|
+
#------------------------------------- Initializing
|
|
109
|
+
if flagInit:
|
|
110
|
+
self.initialize()
|
|
111
|
+
|
|
112
|
+
def initialize(self):
|
|
113
|
+
pri.Info.yellow(f'{"*"*20} PROCESS Disp initialization {"*"*20}')
|
|
114
|
+
self.setTABpar(FlagAdjustPar=True,FlagBridge=False)
|
|
115
|
+
self.add_TABpar('initialization')
|
|
116
|
+
self.setFocus()
|
|
117
|
+
|
|
118
|
+
#*************************************************** Adjusting parameters
|
|
119
|
+
def adjustPROpar(self):
|
|
120
|
+
minIWSize=min([self.PROpar.Vect[0],self.PROpar.Vect[2]])
|
|
121
|
+
self.PROpar.SemiWidth_Epipolar=min([self.PROpar.SemiWidth_Epipolar, int(minIWSize/4)])
|
|
122
|
+
self.PROpar.Filter_SemiWidth=min([self.PROpar.Filter_SemiWidth, int(minIWSize/4)])
|
|
123
|
+
self.ui.spin_SemiWidth_Epipolar.setMaximum(int(minIWSize/4))
|
|
124
|
+
self.ui.spin_Filter_SemiWidth.setMaximum(int(minIWSize/4))
|
|
125
|
+
return
|
|
126
|
+
|
|
127
|
+
#*************************************************** Layout
|
|
128
|
+
def setPROlayout(self):
|
|
129
|
+
self.ui.w_Std_Threshold.setVisible(self.PROpar.Nit_OutDet>0)
|
|
130
|
+
return
|
|
131
|
+
|
|
132
|
+
#*************************************************** Windowing and Correlation
|
|
133
|
+
#******************** Actions
|
|
134
|
+
def line_edit_IW_action(self):
|
|
135
|
+
text=self.ui.line_edit_IW.text()
|
|
136
|
+
split_text=re.split(r'(\d+)', text)[1:-1:2]
|
|
137
|
+
split_num=[int(t) for t in split_text]
|
|
138
|
+
if len(split_num)<4: split_num+=[split_num[-1]]*(4-len(split_num))
|
|
139
|
+
vect=[int(split_num[i]) for i in (0,2,1,3)]
|
|
140
|
+
FlagValid=len(vect)==4 and all([v>0 for v in vect])
|
|
141
|
+
if FlagValid:
|
|
142
|
+
self.PROpar.Vect=vect
|
|
143
|
+
else:
|
|
144
|
+
message='IW sizes or spacings were assigned inconsistently! Please, retry!'
|
|
145
|
+
showTip(self,message)
|
|
146
|
+
return
|
|
147
|
+
|
|
148
|
+
#******************** Settings
|
|
149
|
+
def line_edit_IW_set(self):
|
|
150
|
+
vect=[f'{self.PROpar.Vect[i]}' for i in (0,2,1,3)]
|
|
151
|
+
vectStr=', '.join(vect)
|
|
152
|
+
self.ui.line_edit_IW.setText(vectStr)
|
|
153
|
+
|
|
154
|
+
if __name__ == "__main__":
|
|
155
|
+
import sys
|
|
156
|
+
app=QApplication.instance()
|
|
157
|
+
if not app:app = QApplication(sys.argv)
|
|
158
|
+
app.setStyle('Fusion')
|
|
159
|
+
object = Process_Tab_Disp(None)
|
|
160
|
+
object.show()
|
|
161
|
+
app.exec()
|
|
162
|
+
app.quit()
|
|
163
|
+
app=None
|