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/Import_Tab_CalVi.py
DELETED
|
@@ -1,861 +0,0 @@
|
|
|
1
|
-
import PySide6.QtGui
|
|
2
|
-
from .ui_Import_Tab_CalVi import*
|
|
3
|
-
#from Import_Tab_tools import*
|
|
4
|
-
from .TabTools import*
|
|
5
|
-
|
|
6
|
-
#bufferSizeLimit=2000*1e6 #bytes
|
|
7
|
-
|
|
8
|
-
class INPpar_CalVi(TABpar):
|
|
9
|
-
def __init__(self):
|
|
10
|
-
self.setup()
|
|
11
|
-
super().__init__()
|
|
12
|
-
self.name='INPpar_CalVi'
|
|
13
|
-
self.surname='INPUT_Tab_CalVi'
|
|
14
|
-
self.unchecked_fields+=['FlagValidPath','FlagValidPathOut','FlagValidRootOut']
|
|
15
|
-
|
|
16
|
-
def setup(self):
|
|
17
|
-
self.FlagValidPath = 1
|
|
18
|
-
self.path = './'
|
|
19
|
-
self.root = ''
|
|
20
|
-
self.ext = ''
|
|
21
|
-
self.cams=[]
|
|
22
|
-
self.filenames=[]
|
|
23
|
-
self.flagImages=[]
|
|
24
|
-
self.plapar=[]
|
|
25
|
-
self.x = -1
|
|
26
|
-
self.y = -1
|
|
27
|
-
self.w = 0
|
|
28
|
-
self.h = 0
|
|
29
|
-
self.W = 0
|
|
30
|
-
self.H = 0
|
|
31
|
-
self.row=0
|
|
32
|
-
self.col=0
|
|
33
|
-
self.list_Image_Files=[]
|
|
34
|
-
self.list_eim=[]
|
|
35
|
-
|
|
36
|
-
self.FlagOptPlane=0
|
|
37
|
-
|
|
38
|
-
self.FlagSameAsInput=1
|
|
39
|
-
self.FlagValidPathOut=1
|
|
40
|
-
self.pathout='./'
|
|
41
|
-
self.FlagValidRootOut=1
|
|
42
|
-
self.radout='pyCal'
|
|
43
|
-
|
|
44
|
-
self.errorMessage=''
|
|
45
|
-
self.FlagReadCalib=False
|
|
46
|
-
|
|
47
|
-
self.pathCompleter=basefold_DEBUGOptions
|
|
48
|
-
|
|
49
|
-
class Import_Tab_CalVi(gPaIRS_Tab):
|
|
50
|
-
|
|
51
|
-
class Import_Tab_Signals(gPaIRS_Tab.Tab_Signals):
|
|
52
|
-
list_selection=Signal()
|
|
53
|
-
pass
|
|
54
|
-
|
|
55
|
-
def __init__(self,*args):
|
|
56
|
-
parent=None
|
|
57
|
-
flagInit=True
|
|
58
|
-
if len(args): parent=args[0]
|
|
59
|
-
if len(args)>1: flagInit=args[1]
|
|
60
|
-
super().__init__(parent,Ui_ImportTab_CalVi,INPpar_CalVi)
|
|
61
|
-
self.signals=self.Import_Tab_Signals(self)
|
|
62
|
-
|
|
63
|
-
#------------------------------------- Graphical interface: widgets
|
|
64
|
-
self.ui: Ui_ImportTab_CalVi
|
|
65
|
-
ui=self.ui
|
|
66
|
-
ui.spin_x.addwid=[ui.spin_w]
|
|
67
|
-
ui.spin_y.addwid=[ui.spin_h]
|
|
68
|
-
|
|
69
|
-
self.setupWid() #---------------- IMPORTANT
|
|
70
|
-
|
|
71
|
-
#------------------------------------- Graphical interface: miscellanea
|
|
72
|
-
self.mapx = QPixmap(''+ icons_path +'redx.png')
|
|
73
|
-
self.mapv = QPixmap(''+ icons_path +'greenv.png')
|
|
74
|
-
self.mapw = QPixmap(''+ icons_path +'waiting_c.png')
|
|
75
|
-
self.Lab_warning=QPixmap(u""+ icons_path +"warning.png")
|
|
76
|
-
|
|
77
|
-
self.list_Path_Root=["edit_path","button_path","edit_cams","button_import"]
|
|
78
|
-
self.list_Spins=["spin_x","spin_y","spin_w","spin_h"]
|
|
79
|
-
self.list_Image_Opt=["radio_cam"]
|
|
80
|
-
self.list_List_Images=["list_images"]
|
|
81
|
-
self.list_All=self.list_Path_Root[:]+self.list_Spins[:]+self.list_Image_Opt[:]+self.list_List_Images[:]
|
|
82
|
-
self.spin_fields=("x","y","w","h")
|
|
83
|
-
|
|
84
|
-
self.edit_path_label=QPixmap()
|
|
85
|
-
self.edit_cams_label=QPixmap()
|
|
86
|
-
|
|
87
|
-
self.tableHeaders =[self.ui.list_images.horizontalHeaderItem(i).text() for i in range(self.ui.list_images.columnCount())]
|
|
88
|
-
header = self.ui.list_images.horizontalHeader()
|
|
89
|
-
header.setSectionResizeMode(0, QHeaderView.ResizeMode.Interactive)
|
|
90
|
-
header.setSectionResizeMode(1, QHeaderView.ResizeMode.Stretch)
|
|
91
|
-
header.setSectionResizeMode(2, QHeaderView.ResizeMode.ResizeToContents)
|
|
92
|
-
#header.setMinimumSectionSize(int(self.minimumWidth()/2))
|
|
93
|
-
#header.setMaximumSectionSize(int(self.maximumWidth()/2))
|
|
94
|
-
self.ui.list_images.InfoLabel=self.ui.label_info
|
|
95
|
-
self.ui.list_images.DeleteButton=self.ui.button_delete
|
|
96
|
-
#self.ui.list_images.addfuncreturn['plapar']=self.updatePlanePar
|
|
97
|
-
#self.ui.list_images.addfuncout['plapar']=self.updatePlanePar
|
|
98
|
-
self.ui.label_info.hide()
|
|
99
|
-
|
|
100
|
-
#------------------------------------- Declaration of parameters
|
|
101
|
-
self.INPpar_base=INPpar_CalVi()
|
|
102
|
-
self.INPpar_old:INPpar_CalVi=self.TABpar_old
|
|
103
|
-
self.INPpar:INPpar_CalVi=self.TABpar
|
|
104
|
-
self.defineSetTABpar(self.setINPpar)
|
|
105
|
-
|
|
106
|
-
self.bufferImg={}
|
|
107
|
-
self.bufferSize=0
|
|
108
|
-
|
|
109
|
-
#------------------------------------- Callbacks
|
|
110
|
-
self.setupCallbacks()
|
|
111
|
-
self.FlagSettingPar=False
|
|
112
|
-
|
|
113
|
-
#------------------------------------- Initializing
|
|
114
|
-
if flagInit:
|
|
115
|
-
self.initialize()
|
|
116
|
-
|
|
117
|
-
#self.ParPointer.w=self.ParPointer.W=infoImages[5]
|
|
118
|
-
#self.ParPointer.h=self.ParPointer.H=infoImages[6]
|
|
119
|
-
|
|
120
|
-
def initialize(self):
|
|
121
|
-
pri.Info.yellow(f'{"*"*20} INPUT initialization {"*"*20}')
|
|
122
|
-
#self.ui.edit_path.setFocus()
|
|
123
|
-
self.ui.edit_path.setText(basefold)
|
|
124
|
-
self.edit_path_action()
|
|
125
|
-
self.setTABpar(True) #with bridge
|
|
126
|
-
|
|
127
|
-
def setupCallbacks(self):
|
|
128
|
-
#Callbacks
|
|
129
|
-
self.ui.button_data.clicked.connect(lambda: downloadExampleData(self,'https://www.pairs.unina.it/web/Calibration_data.zip'))
|
|
130
|
-
|
|
131
|
-
self.ui.edit_path.textChanged.connect(self.edit_path_changing)
|
|
132
|
-
self.ui.edit_path.editingFinished.connect(self.edit_path_finished)
|
|
133
|
-
self.edit_path_callback=self.addParWrapper(self.edit_path_action,'Input folder path')
|
|
134
|
-
self.ui.edit_path.returnPressed.connect(self.edit_path_callback)
|
|
135
|
-
self.ui.button_path.clicked.connect(\
|
|
136
|
-
self.addParWrapper(self.button_path_callback,'Input folder path'))
|
|
137
|
-
self.ui.edit_path.FunSetCompleterList=self.setPathCompleter
|
|
138
|
-
|
|
139
|
-
self.ui.radio_cam.toggled.connect(self.addParWrapper(self.radio_cam_callback,'_cam* in filename'))
|
|
140
|
-
self.ui.edit_cams.editingFinished.connect(self.addParWrapper(self.edit_cams_callback,'Camera id. numbers'))
|
|
141
|
-
|
|
142
|
-
self.button_import_callback=self.addParWrapper(self.button_import_action,'Importing of target images')
|
|
143
|
-
self.ui.button_import.clicked.connect(self.button_import_callback)
|
|
144
|
-
self.button_import_plane_callback=self.addParWrapper(self.button_import_plane_action,'Importing of plane parameters')
|
|
145
|
-
self.ui.button_import_plane.clicked.connect(self.button_import_plane_callback)
|
|
146
|
-
self.button_up_callback= self.addParWrapper(lambda: self.button_updown_callback(-1),'Order of target images')
|
|
147
|
-
self.ui.button_up.clicked.connect(self.button_up_callback)
|
|
148
|
-
self.button_down_callback= self.addParWrapper(lambda: self.button_updown_callback(+1),'Order of target images')
|
|
149
|
-
self.ui.button_down.clicked.connect(self.button_down_callback)
|
|
150
|
-
self.button_delete_callback=self.addParWrapper(self.button_delete_action,'Deleting target images')
|
|
151
|
-
self.ui.button_delete.clicked.connect(self.button_delete_callback)
|
|
152
|
-
self.button_clean_callback=self.addParWrapper(self.button_clean_action,'Cleaning the image list')
|
|
153
|
-
self.ui.button_clean.clicked.connect(self.button_clean_callback)
|
|
154
|
-
self.ui.list_images.contextMenuEvent=lambda e: self.listContextMenuEvent(self.ui.list_images,e)
|
|
155
|
-
|
|
156
|
-
self.ui.list_images.cellChanged.connect(self.addParWrapper(self.updatePlanePar,'Plane parameters'))
|
|
157
|
-
self.ui.list_images.itemSelectionChanged.connect(self.addParWrapper(self.list_selection,'Item selection'))
|
|
158
|
-
|
|
159
|
-
self.setSpinxywhCallbacks()
|
|
160
|
-
|
|
161
|
-
self.ui.edit_path_out.textChanged.connect(self.edit_path_out_changing)
|
|
162
|
-
#self.ui.edit_path_out.editingFinished.connect(self.edit_path_out_finished)
|
|
163
|
-
self.ui.edit_root_out.textChanged.connect(self.edit_root_out_changing)
|
|
164
|
-
#self.ui.edit_root_out.editingFinished.connect(self.edit_root_out_finished)
|
|
165
|
-
|
|
166
|
-
signals=[["clicked"],
|
|
167
|
-
["toggled"],
|
|
168
|
-
["editingFinished"]]
|
|
169
|
-
fields=["button",
|
|
170
|
-
"check",
|
|
171
|
-
"edit"]
|
|
172
|
-
names=[ ['path_out'], #button,
|
|
173
|
-
['same_as_inp'], #check
|
|
174
|
-
['root_out','path_out']] #edit
|
|
175
|
-
tips=[ ['Output folder path'], #button,
|
|
176
|
-
['Output folder path same as input'], #check
|
|
177
|
-
['Root of output files','Output folder path']] #edit
|
|
178
|
-
|
|
179
|
-
for f,N,S,T in zip(fields,names,signals,tips):
|
|
180
|
-
for n,t in zip(N,T):
|
|
181
|
-
wid=getattr(self.ui,f+"_"+n)
|
|
182
|
-
fcallback=getattr(self,f+"_"+n+"_callback")
|
|
183
|
-
fcallbackWrapped=self.addParWrapper(fcallback,t)
|
|
184
|
-
for s in S:
|
|
185
|
-
sig=getattr(wid,s)
|
|
186
|
-
sig.connect(fcallbackWrapped)
|
|
187
|
-
|
|
188
|
-
def listContextMenuEvent(self, list_images:QTableWidget, event):
|
|
189
|
-
item=list_images.currentItem()
|
|
190
|
-
if not item: return
|
|
191
|
-
menu=QMenu(list_images)
|
|
192
|
-
buttons=['import', 'import_plane',
|
|
193
|
-
-1,'down','up',
|
|
194
|
-
-1,'delete','clean']
|
|
195
|
-
name=[]
|
|
196
|
-
act=[]
|
|
197
|
-
fun=[]
|
|
198
|
-
for k,nb in enumerate(buttons):
|
|
199
|
-
if type(nb)==str:
|
|
200
|
-
b:QPushButton=getattr(self.ui,'button_'+nb)
|
|
201
|
-
if b.isVisible() and b.isEnabled():
|
|
202
|
-
if hasattr(self,'button_'+nb+'_callback'):
|
|
203
|
-
name.append(nb)
|
|
204
|
-
act.append(QAction(b.icon(),toPlainText(b.toolTip().split('.')[0]),list_images))
|
|
205
|
-
menu.addAction(act[-1])
|
|
206
|
-
callback=getattr(self,'button_'+nb+'_callback')
|
|
207
|
-
fun.append(callback)
|
|
208
|
-
else:
|
|
209
|
-
if len(act): menu.addSeparator()
|
|
210
|
-
|
|
211
|
-
if len(act):
|
|
212
|
-
pri.Callback.yellow(f'||| Opening image list context menu |||')
|
|
213
|
-
action = menu.exec_(list_images.mapToGlobal(event.pos()))
|
|
214
|
-
for nb,a,f in zip(name,act,fun):
|
|
215
|
-
if a==action:
|
|
216
|
-
f()
|
|
217
|
-
break
|
|
218
|
-
else:
|
|
219
|
-
toolTip=item.toolTip()
|
|
220
|
-
item.setToolTip('')
|
|
221
|
-
|
|
222
|
-
message='No context menu available! Please, pause processing.'
|
|
223
|
-
tip=QToolTip(self)
|
|
224
|
-
toolTipDuration=self.toolTipDuration()
|
|
225
|
-
self.setToolTipDuration(3000)
|
|
226
|
-
tip.showText(QCursor.pos(),message)
|
|
227
|
-
self.setToolTipDuration(toolTipDuration)
|
|
228
|
-
item.setToolTip(toolTip)
|
|
229
|
-
|
|
230
|
-
#*************************************************** From Parameters to UI
|
|
231
|
-
def setINPpar(self):
|
|
232
|
-
self.FlagSettingPar=True
|
|
233
|
-
#pri.Time.blue(1,'INPpar: beginning')
|
|
234
|
-
self.ChangeText_path(self.INPpar.path)
|
|
235
|
-
self.INPpar.FlagValidPath=os.path.exists(self.INPpar.path)
|
|
236
|
-
self.setPathLabel()
|
|
237
|
-
self.setPathCompleter()
|
|
238
|
-
self.set_cams()
|
|
239
|
-
self.set_list_images_items()
|
|
240
|
-
if self.INPpar.FlagValidPath:
|
|
241
|
-
self.Enable_ImgObjects()
|
|
242
|
-
else:
|
|
243
|
-
self.Disable_ImgObjects()
|
|
244
|
-
|
|
245
|
-
flagSelect=self.ui.list_images.currentRow()>-1
|
|
246
|
-
self.ui.button_down.setEnabled(flagSelect)
|
|
247
|
-
self.ui.button_up.setEnabled(flagSelect)
|
|
248
|
-
self.ui.button_delete.setEnabled(flagSelect)
|
|
249
|
-
|
|
250
|
-
#pri.Time.blue(0,'INPpar: path-root')
|
|
251
|
-
|
|
252
|
-
#pri.Time.blue(0,'INPpar: list')
|
|
253
|
-
x=self.TABpar.x
|
|
254
|
-
y=self.TABpar.y
|
|
255
|
-
w=self.TABpar.w
|
|
256
|
-
h=self.TABpar.h
|
|
257
|
-
self.setMinMaxSpinxywh()
|
|
258
|
-
self.TABpar.x=x
|
|
259
|
-
self.TABpar.y=y
|
|
260
|
-
self.TABpar.w=w
|
|
261
|
-
self.TABpar.h=h
|
|
262
|
-
self.setValueSpinxywh()
|
|
263
|
-
|
|
264
|
-
self.ui.check_same_as_inp.setChecked(self.INPpar.FlagSameAsInput)
|
|
265
|
-
self.check_same_as_inp_action() #todo GP: credo sia ridondante ma avevo dei problemi
|
|
266
|
-
self.ui.w_OutputFolder.setEnabled(not self.INPpar.FlagSameAsInput)
|
|
267
|
-
self.ui.edit_path_out.setText(self.INPpar.pathout)
|
|
268
|
-
self.setFlagValidPathOut()
|
|
269
|
-
self.setPathOutLabel()
|
|
270
|
-
self.ui.w_button_path_out.setEnabled(not self.INPpar.FlagSameAsInput)
|
|
271
|
-
self.ui.edit_root_out.setText(self.INPpar.radout)
|
|
272
|
-
self.setFlagValidRootOut()
|
|
273
|
-
self.setRootOutLabel()
|
|
274
|
-
|
|
275
|
-
self.FlagSettingPar=False
|
|
276
|
-
#self.signals.list_selection.emit()
|
|
277
|
-
#pri.Time.blue(0,'INPpar: end')
|
|
278
|
-
|
|
279
|
-
def ChangeText_path(self,text):
|
|
280
|
-
text=myStandardPath(text)
|
|
281
|
-
self.ui.edit_path.setText(text)
|
|
282
|
-
|
|
283
|
-
def setPathLabel(self):
|
|
284
|
-
if self.INPpar.FlagValidPath==1:
|
|
285
|
-
self.ui.label_check_path.setPixmap(self.mapv)
|
|
286
|
-
self.ui.label_check_path.setToolTip("This path exists! 😃")
|
|
287
|
-
elif self.INPpar.FlagValidPath==0:
|
|
288
|
-
self.ui.label_check_path.setPixmap(self.mapx)
|
|
289
|
-
self.ui.label_check_path.setToolTip("This path does not exist! 😞")
|
|
290
|
-
elif self.INPpar.FlagValidPath==-10:
|
|
291
|
-
self.ui.label_check_path.setPixmap(self.mapw)
|
|
292
|
-
self.ui.label_check_path.setToolTip("This path is currently under inspection! ⌛")
|
|
293
|
-
self.edit_path_label=self.ui.label_check_path.pixmap()
|
|
294
|
-
|
|
295
|
-
def setPathCompleter(self):
|
|
296
|
-
self.edit_path_completer=QCompleter(self.INPpar.pathCompleter)
|
|
297
|
-
self.edit_path_completer.setCompletionMode(QCompleter.CompletionMode(1))
|
|
298
|
-
self.edit_path_completer.setModelSorting(QCompleter.ModelSorting(2))
|
|
299
|
-
self.edit_path_completer.setWidget(self.ui.edit_path)
|
|
300
|
-
if self.INPpar.path in self.INPpar.pathCompleter:
|
|
301
|
-
k=self.INPpar.pathCompleter.index(self.INPpar.path)
|
|
302
|
-
self.edit_path_completer.setCurrentRow(k)
|
|
303
|
-
self.ui.edit_path.setCompleter(self.edit_path_completer)
|
|
304
|
-
self.ui.edit_path.FlagCompleter=True
|
|
305
|
-
|
|
306
|
-
def ChangeText_root(self,text,*args):
|
|
307
|
-
text=myStandardRoot(text)
|
|
308
|
-
text=text.replace(';',' ; ')
|
|
309
|
-
self.ui.edit_cams.setText(text)
|
|
310
|
-
|
|
311
|
-
def Disable_ImgObjects(self):
|
|
312
|
-
for nobj in range(len(self.spin_fields)):
|
|
313
|
-
obj=getattr(self.ui,self.list_Spins[nobj])
|
|
314
|
-
obj.setEnabled(False)
|
|
315
|
-
field_value=getattr(self.INPpar_base,self.spin_fields[nobj])
|
|
316
|
-
obj.setValue(field_value)
|
|
317
|
-
self.ui.w_InputImg.setVisible(False)
|
|
318
|
-
self.ui.list_images.setEnabled(False)
|
|
319
|
-
self.ui.w_SizeImg.setVisible(False)
|
|
320
|
-
for nobj in range(len(self.list_Image_Opt)):
|
|
321
|
-
obj=getattr(self.ui,self.list_Image_Opt[nobj])
|
|
322
|
-
obj.setEnabled(False)
|
|
323
|
-
self.ui.button_import_plane.setEnabled(False)
|
|
324
|
-
self.ui.button_delete.setEnabled(False)
|
|
325
|
-
self.ui.button_clean.setEnabled(False)
|
|
326
|
-
|
|
327
|
-
def Enable_ImgObjects(self):
|
|
328
|
-
for nobj in range(len(self.list_Spins)):
|
|
329
|
-
obj=getattr(self.ui,self.list_Spins[nobj])
|
|
330
|
-
obj.setEnabled(len(self.INPpar.filenames))
|
|
331
|
-
self.ui.w_InputImg.setVisible(len(self.INPpar.cams))
|
|
332
|
-
self.ui.list_images.setEnabled(True)
|
|
333
|
-
self.ui.w_SizeImg.setVisible(len(self.INPpar.filenames))
|
|
334
|
-
for nobj in range(len(self.list_Image_Opt)):
|
|
335
|
-
obj=getattr(self.ui,self.list_Image_Opt[nobj])
|
|
336
|
-
obj.setEnabled(True)
|
|
337
|
-
self.ui.button_import_plane.setEnabled(len(self.INPpar.filenames))
|
|
338
|
-
self.ui.button_delete.setEnabled(len(self.INPpar.filenames))
|
|
339
|
-
self.ui.button_clean.setEnabled(len(self.INPpar.filenames))
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
#*************************************************** Edit path and root
|
|
343
|
-
def edit_path_changing(self):
|
|
344
|
-
self.ui.label_check_path.setPixmap(QPixmap())
|
|
345
|
-
|
|
346
|
-
def edit_path_finished(self):
|
|
347
|
-
self.ui.edit_path.setText(self.INPpar.path)
|
|
348
|
-
self.setPathLabel()
|
|
349
|
-
|
|
350
|
-
def edit_path_action(self,*args):
|
|
351
|
-
if len(args): target=args[0]
|
|
352
|
-
else: target=''
|
|
353
|
-
currpath=myStandardPath(self.ui.edit_path.text())
|
|
354
|
-
directory_path = myStandardPath(os.getcwd())
|
|
355
|
-
if directory_path in currpath:
|
|
356
|
-
currpath=currpath.replace(directory_path,'./')
|
|
357
|
-
self.set_currpath(currpath)
|
|
358
|
-
if os.path.exists(currpath):
|
|
359
|
-
if currpath in self.INPpar.pathCompleter:
|
|
360
|
-
self.INPpar.pathCompleter.pop(self.INPpar.pathCompleter.index(currpath))
|
|
361
|
-
self.INPpar.pathCompleter.insert(0,currpath)
|
|
362
|
-
if len(self.INPpar.pathCompleter)>10: self.INPpar.pathCompleter=self.INPpar.pathCompleter[:10]
|
|
363
|
-
self.check_same_as_inp_action()
|
|
364
|
-
|
|
365
|
-
def set_currpath(self,currpath,flagAdjustList=True):
|
|
366
|
-
oldpath=self.INPpar.path
|
|
367
|
-
self.ui.edit_path.setText(currpath)
|
|
368
|
-
self.INPpar.path=currpath
|
|
369
|
-
|
|
370
|
-
if os.path.exists(currpath):
|
|
371
|
-
self.INPpar.FlagValidPath=1
|
|
372
|
-
#if oldpath!=currpath:
|
|
373
|
-
# self.reset_list_images()
|
|
374
|
-
else:
|
|
375
|
-
self.INPpar.FlagValidPath=0
|
|
376
|
-
self.INPpar.cams=[]
|
|
377
|
-
if flagAdjustList: self.adjust_list_images()
|
|
378
|
-
|
|
379
|
-
def reset_list_images(self):
|
|
380
|
-
self.INPpar.filenames=[]
|
|
381
|
-
self.INPpar.plapar=[]
|
|
382
|
-
self.INPpar.x = self.INPpar.y = -1
|
|
383
|
-
self.INPpar.w = self.INPpar.h = 0
|
|
384
|
-
self.INPpar.W = self.INPpar.H = 0
|
|
385
|
-
self.INPpar.row=0
|
|
386
|
-
self.INPpar.col=0
|
|
387
|
-
|
|
388
|
-
def button_path_callback(self):
|
|
389
|
-
directory = str(QFileDialog.getExistingDirectory(self,\
|
|
390
|
-
"Choose a folder", dir=self.INPpar.path,options=optionNativeDialog))
|
|
391
|
-
currpath='{}'.format(directory)
|
|
392
|
-
if not currpath=='':
|
|
393
|
-
self.ui.edit_path.setText(currpath)
|
|
394
|
-
self.edit_path_action()
|
|
395
|
-
|
|
396
|
-
def radio_cam_callback(self):
|
|
397
|
-
if self.ui.radio_cam.isChecked():
|
|
398
|
-
if not len(self.INPpar.cams):
|
|
399
|
-
ncam=0
|
|
400
|
-
for f in self.INPpar.filenames:
|
|
401
|
-
pats=re.findall('_cam\d+', f)
|
|
402
|
-
if len(pats):
|
|
403
|
-
ncam=int(pats[-1].replace("_cam",""))
|
|
404
|
-
break
|
|
405
|
-
self.INPpar.cams=[ncam]
|
|
406
|
-
self.adjust_list_images()
|
|
407
|
-
else:
|
|
408
|
-
return
|
|
409
|
-
else:
|
|
410
|
-
if len(self.INPpar.cams):
|
|
411
|
-
scam=str(self.INPpar.cams[0])
|
|
412
|
-
self.INPpar.filenames=[f.replace('*',scam) for f in self.INPpar.filenames]
|
|
413
|
-
self.INPpar.cams=[]
|
|
414
|
-
self.adjust_list_images()
|
|
415
|
-
else:
|
|
416
|
-
return
|
|
417
|
-
|
|
418
|
-
def edit_cams_callback(self):
|
|
419
|
-
text=self.ui.edit_cams.text()
|
|
420
|
-
split_text=re.split('(\d+)', text)[1:-1:2]
|
|
421
|
-
a=np.array([int(i) for i in split_text],dtype=np.intc)
|
|
422
|
-
indexes = np.unique(a, return_index=True)[1]
|
|
423
|
-
self.INPpar.cams=[a[index] for index in sorted(indexes)]
|
|
424
|
-
self.check_cams()
|
|
425
|
-
self.adjust_list_images()
|
|
426
|
-
|
|
427
|
-
def button_import_action(self):
|
|
428
|
-
filenames, _ = QFileDialog.getOpenFileNames(self,\
|
|
429
|
-
"Select an image file of the sequence", filter=text_filter, dir=self.INPpar.path,\
|
|
430
|
-
options=optionNativeDialog)
|
|
431
|
-
if len(filenames):
|
|
432
|
-
oldpath=self.INPpar.path
|
|
433
|
-
filename0=myStandardRoot('{}'.format(str(filenames[0])))
|
|
434
|
-
directory_path = myStandardPath(os.getcwd())
|
|
435
|
-
currpath, target = os.path.split(filename0)
|
|
436
|
-
currpath=myStandardPath(currpath)
|
|
437
|
-
if directory_path in currpath:
|
|
438
|
-
currpath=currpath.replace(directory_path,'./')
|
|
439
|
-
self.set_currpath(currpath,flagAdjustList=False)
|
|
440
|
-
if self.INPpar.FlagValidPath:
|
|
441
|
-
f_new=[]
|
|
442
|
-
f_warning=[]
|
|
443
|
-
for f in filenames:
|
|
444
|
-
f=os.path.basename(f)
|
|
445
|
-
FlagNew=True
|
|
446
|
-
if len(self.INPpar.cams):
|
|
447
|
-
fsplitted=re.split('_cam\d+', f)
|
|
448
|
-
if len(fsplitted)>1:
|
|
449
|
-
fsplitted.insert(-1,'_cam*')
|
|
450
|
-
f="".join(fsplitted)
|
|
451
|
-
else:
|
|
452
|
-
f_warning.append(f) #redundant
|
|
453
|
-
FlagNew=False
|
|
454
|
-
if f and not f in self.INPpar.filenames and not f in f_new and FlagNew:
|
|
455
|
-
f_new.append(f)
|
|
456
|
-
if len(f_new):
|
|
457
|
-
for t in f_new:
|
|
458
|
-
self.INPpar.filenames.append(t)
|
|
459
|
-
if self.INPpar.FlagOptPlane:
|
|
460
|
-
self.INPpar.plapar.append([float(0)]*6)
|
|
461
|
-
else:
|
|
462
|
-
self.INPpar.plapar.append([float(0)])
|
|
463
|
-
else:
|
|
464
|
-
self.set_currpath(oldpath,flagAdjustList=False)
|
|
465
|
-
if len(f_warning):
|
|
466
|
-
list_img_warn=';\n'.join(f_warning)
|
|
467
|
-
Message=f'The following files located in the path {currpath} do not contain the pattern _cam* in their name and will not be included in the list of image files for the calibration process:\n{list_img_warn}.'
|
|
468
|
-
warningDialog(self,Message)
|
|
469
|
-
self.adjust_list_images()
|
|
470
|
-
return
|
|
471
|
-
|
|
472
|
-
def button_import_plane_action(self):
|
|
473
|
-
plaparName, _ = QFileDialog.getOpenFileName(self,\
|
|
474
|
-
"Select a plane parameter file", filter=f'*{outExt.pla}',\
|
|
475
|
-
dir=self.INPpar.path,\
|
|
476
|
-
options=optionNativeDialog)
|
|
477
|
-
if not plaparName: return
|
|
478
|
-
try:
|
|
479
|
-
if os.path.exists(plaparName):
|
|
480
|
-
with open(plaparName, 'r') as file:
|
|
481
|
-
data=file.read()
|
|
482
|
-
dp=eval(data)
|
|
483
|
-
pass
|
|
484
|
-
except:
|
|
485
|
-
WarningMessage=f'Error with loading the file: {plaparName}\n'
|
|
486
|
-
warningDialog(self,WarningMessage)
|
|
487
|
-
else:
|
|
488
|
-
try:
|
|
489
|
-
if len(self.INPpar.plapar[self.INPpar.row])==1:
|
|
490
|
-
self.INPpar.plapar[self.INPpar.row]=[round(dp['z (mm)'],3)]
|
|
491
|
-
else:
|
|
492
|
-
self.INPpar.plapar[self.INPpar.row]=[round(p,3) for p in list(dp.values())]
|
|
493
|
-
except:
|
|
494
|
-
WarningMessage=f'Error with setting the plane parameters read from file: {plaparName}\n'
|
|
495
|
-
warningDialog(self,WarningMessage)
|
|
496
|
-
|
|
497
|
-
def button_delete_action(self):
|
|
498
|
-
k=self.INPpar.row=self.ui.list_images.currentRow()
|
|
499
|
-
if k>-1:
|
|
500
|
-
self.INPpar.filenames.pop(k)
|
|
501
|
-
self.INPpar.plapar.pop(k)
|
|
502
|
-
self.adjust_list_images()
|
|
503
|
-
|
|
504
|
-
def button_clean_action(self):
|
|
505
|
-
"""
|
|
506
|
-
for k in range(len(self.INPpar.filenames)):
|
|
507
|
-
self.INPpar.row=0
|
|
508
|
-
self.INPpar.filenames.pop(0)
|
|
509
|
-
self.INPpar.plapar.pop(0)
|
|
510
|
-
self.adjust_list_images()
|
|
511
|
-
"""
|
|
512
|
-
self.reset_list_images()
|
|
513
|
-
self.adjust_list_images()
|
|
514
|
-
#"""
|
|
515
|
-
return
|
|
516
|
-
|
|
517
|
-
def button_updown_callback(self,d):
|
|
518
|
-
k=self.ui.list_images.currentRow()
|
|
519
|
-
if d==-1 and k==0: return
|
|
520
|
-
if d==+1 and k==len(self.INPpar.filenames)-1: return
|
|
521
|
-
self.INPpar.row+=d
|
|
522
|
-
filename=self.INPpar.filenames.pop(k)
|
|
523
|
-
self.INPpar.filenames.insert(k+d,filename)
|
|
524
|
-
par=self.INPpar.plapar.pop(k)
|
|
525
|
-
self.INPpar.plapar.insert(k+d,par)
|
|
526
|
-
self.adjust_list_images()
|
|
527
|
-
self.ui.list_images.setFocus()
|
|
528
|
-
return [0,None]
|
|
529
|
-
|
|
530
|
-
def list_selection(self):
|
|
531
|
-
self.ui.list_images.resizeInfoLabel()
|
|
532
|
-
flagSelect=self.ui.list_images.currentRow()>-1
|
|
533
|
-
self.ui.button_down.setEnabled(flagSelect)
|
|
534
|
-
self.ui.button_up.setEnabled(flagSelect)
|
|
535
|
-
self.ui.button_delete.setEnabled(flagSelect)
|
|
536
|
-
|
|
537
|
-
self.INPpar.row=self.ui.list_images.currentRow()
|
|
538
|
-
self.INPpar.col=self.ui.list_images.currentColumn()
|
|
539
|
-
self.signals.list_selection.emit()
|
|
540
|
-
return [-1,None]
|
|
541
|
-
|
|
542
|
-
#*************************************************** Image set controls
|
|
543
|
-
def set_cams(self):
|
|
544
|
-
flag=len(self.INPpar.cams)>0
|
|
545
|
-
self.ui.radio_cam.setChecked(flag)
|
|
546
|
-
self.ui.w_InputImg.setEnabled(flag)
|
|
547
|
-
if flag:
|
|
548
|
-
self.INPpar.root=", ".join([str(v) for v in self.INPpar.cams])
|
|
549
|
-
else:
|
|
550
|
-
self.INPpar.root=''
|
|
551
|
-
self.ChangeText_root(self.INPpar.root)
|
|
552
|
-
return
|
|
553
|
-
|
|
554
|
-
def check_cams(self):
|
|
555
|
-
if self.father:
|
|
556
|
-
if len(self.INPpar.cams)>1 and self.father.w_Process.PROpar.CalibProcType==0:
|
|
557
|
-
warningDialog(self,'Standard calibration can be performed only one camera at once! The first camera identification number will be retained for the current configuration.')
|
|
558
|
-
self.INPpar.cams=[self.INPpar.cams[0]]
|
|
559
|
-
|
|
560
|
-
def adjust_list_images(self):
|
|
561
|
-
#self.set_cams()
|
|
562
|
-
#deleting filenames not compatible with the option _cam* in the filename
|
|
563
|
-
flag_ncam=len(self.INPpar.cams)
|
|
564
|
-
ind_del=[]
|
|
565
|
-
for k,f in enumerate(self.INPpar.filenames):
|
|
566
|
-
if (not '_cam' in f and flag_ncam) or\
|
|
567
|
-
('_cam*' in f and not flag_ncam):
|
|
568
|
-
ind_del.append(k)
|
|
569
|
-
for kk in range(len(ind_del)-1,-1,-1):
|
|
570
|
-
k=ind_del[kk]
|
|
571
|
-
self.INPpar.filenames.pop(k)
|
|
572
|
-
self.INPpar.plapar.pop(k)
|
|
573
|
-
|
|
574
|
-
#check that the filename contains * and not an identifier number
|
|
575
|
-
if len(self.INPpar.cams):
|
|
576
|
-
for k,f in enumerate(self.INPpar.filenames):
|
|
577
|
-
if '_cam*' in f: continue
|
|
578
|
-
fsplitted=re.split('_cam\d+', f)
|
|
579
|
-
fsplitted.insert(-1,'_cam*')
|
|
580
|
-
f="".join(fsplitted)
|
|
581
|
-
self.INPpar.filenames[k]=f
|
|
582
|
-
f_unique=[]
|
|
583
|
-
plapar_unique=[]
|
|
584
|
-
for f,p in zip(self.INPpar.filenames,self.INPpar.plapar):
|
|
585
|
-
if not f in f_unique:
|
|
586
|
-
f_unique.append(f)
|
|
587
|
-
plapar_unique.append(p)
|
|
588
|
-
self.INPpar.filenames=f_unique
|
|
589
|
-
self.INPpar.plapar=plapar_unique
|
|
590
|
-
|
|
591
|
-
self.INPpar.list_Image_Files=[]
|
|
592
|
-
self.INPpar.list_eim=[]
|
|
593
|
-
flagImgSize=False
|
|
594
|
-
self.INPpar.row=min([len(self.INPpar.filenames),self.INPpar.row])
|
|
595
|
-
for k,f in enumerate(self.INPpar.filenames):
|
|
596
|
-
if flag_ncam:
|
|
597
|
-
list_Image_Files_camk=[self.INPpar.path+f.replace("*",str(ncam)) for ncam in self.INPpar.cams]
|
|
598
|
-
else:
|
|
599
|
-
list_Image_Files_camk=[self.INPpar.path+f]
|
|
600
|
-
|
|
601
|
-
list_eim_camk=[os.path.exists(fk) for fk in list_Image_Files_camk]
|
|
602
|
-
self.INPpar.list_Image_Files.append(list_Image_Files_camk)
|
|
603
|
-
self.INPpar.list_eim.append(list_eim_camk)
|
|
604
|
-
|
|
605
|
-
if not flagImgSize:
|
|
606
|
-
try:
|
|
607
|
-
im = Image.open(list_Image_Files_camk[0])
|
|
608
|
-
self.INPpar.ext=os.path.splitext(list_Image_Files_camk[0])[-1]
|
|
609
|
-
pri.General.blue(f'File extension: {self.INPpar.ext}')
|
|
610
|
-
flagImgSize=True
|
|
611
|
-
except:
|
|
612
|
-
pri.Error.blue(f'Error opening image file: {list_Image_Files_camk[0]}')
|
|
613
|
-
else:
|
|
614
|
-
self.INPpar.W,self.INPpar.H=im.size
|
|
615
|
-
if self.INPpar.w<1 or self.INPpar.w>self.INPpar.W:
|
|
616
|
-
self.INPpar.w=self.INPpar.W
|
|
617
|
-
if self.INPpar.h<1 or self.INPpar.H>self.INPpar.H:
|
|
618
|
-
self.INPpar.h=self.INPpar.H
|
|
619
|
-
if self.INPpar.x<0: self.INPpar.x=0
|
|
620
|
-
elif self.INPpar.x>self.INPpar.W-self.INPpar.w: self.INPpar.x=self.INPpar.W-self.INPpar.w
|
|
621
|
-
if self.INPpar.y<0: self.INPpar.y=0
|
|
622
|
-
elif self.INPpar.y>self.INPpar.H-self.INPpar.h: self.INPpar.y=self.INPpar.H-self.INPpar.h
|
|
623
|
-
return
|
|
624
|
-
|
|
625
|
-
def set_list_images_items(self):
|
|
626
|
-
self.listClear()
|
|
627
|
-
self.INPpar.flagImages=[0]*len(self.INPpar.filenames)
|
|
628
|
-
for k,f in enumerate(self.INPpar.filenames):
|
|
629
|
-
c=self.ui.list_images.rowCount()
|
|
630
|
-
self.ui.list_images.insertRow(c)
|
|
631
|
-
list_eim_camk=self.INPpar.list_eim[k]
|
|
632
|
-
|
|
633
|
-
item_filename=QTableWidgetItem(f)
|
|
634
|
-
item_filename.setFlags(Qt.ItemIsSelectable|Qt.ItemIsEnabled)
|
|
635
|
-
item_filename.setToolTip(f)
|
|
636
|
-
self.ui.list_images.setItem(c, 0, item_filename)
|
|
637
|
-
if self.INPpar.row==k and self.INPpar.col==0:
|
|
638
|
-
item_filename.setSelected(True)
|
|
639
|
-
self.ui.list_images.setCurrentItem(item_filename)
|
|
640
|
-
|
|
641
|
-
if self.INPpar.FlagOptPlane:
|
|
642
|
-
tiptext='Plane parameters: \u03B2 (°), \u03B1 (°), \u03B3 (°), x (mm), y (mm), z (mm)'
|
|
643
|
-
else:
|
|
644
|
-
tiptext='Plane parameters: z (mm)'
|
|
645
|
-
tooltip=QLabel()
|
|
646
|
-
tooltip.setTextFormat(Qt.TextFormat.RichText)
|
|
647
|
-
tooltip.setText(tiptext)
|
|
648
|
-
|
|
649
|
-
item_parameters=QTableWidgetItem(", ".join([str(s) for s in self.INPpar.plapar[k]]))
|
|
650
|
-
item_parameters.setToolTip(tooltip.text())
|
|
651
|
-
self.ui.list_images.setItem(c, 1, item_parameters)
|
|
652
|
-
|
|
653
|
-
message=''
|
|
654
|
-
tiptext=[]
|
|
655
|
-
if len(self.INPpar.plapar[k])==0:
|
|
656
|
-
message+="⚠"
|
|
657
|
-
tiptext+=[f"⚠︎: Corresponding plane parameters are not defined!"]
|
|
658
|
-
self.INPpar.flagImages[k]|=1
|
|
659
|
-
for q in range(k):
|
|
660
|
-
if self.INPpar.plapar[k]==self.INPpar.plapar[q]:
|
|
661
|
-
message+="⚠"
|
|
662
|
-
tiptext+=[f"⚠︎: Plane parameters are coincident with those of plane {'#'} ({q})!"]
|
|
663
|
-
self.INPpar.flagImages[k]|=2
|
|
664
|
-
break
|
|
665
|
-
if not all(list_eim_camk):
|
|
666
|
-
message+="❌"
|
|
667
|
-
if len(self.INPpar.cams):
|
|
668
|
-
cams=",".join([str(self.INPpar.cams[kk]) for kk,e in enumerate(list_eim_camk) if not e])
|
|
669
|
-
tiptext+=[f"❌: Image files for cameras {'#'} ({cams}) are missing!"]
|
|
670
|
-
else:
|
|
671
|
-
tiptext+=[f"❌: Image files is missing!"]
|
|
672
|
-
self.INPpar.flagImages[k]|=4
|
|
673
|
-
if tiptext:
|
|
674
|
-
tiptext=f"<br>".join(tiptext)
|
|
675
|
-
else:
|
|
676
|
-
message="✅"
|
|
677
|
-
tiptext='✅: Check if the values of the plane parameters are correct!'
|
|
678
|
-
tooltip=QLabel()
|
|
679
|
-
tooltip.setTextFormat(Qt.TextFormat.RichText)
|
|
680
|
-
tooltip.setText(tiptext)
|
|
681
|
-
if self.INPpar.row==k and self.INPpar.col==1:
|
|
682
|
-
item_parameters.setSelected(True)
|
|
683
|
-
self.ui.list_images.setCurrentItem(item_parameters)
|
|
684
|
-
|
|
685
|
-
item_message=QTableWidgetItem(message)
|
|
686
|
-
item_message.setFlags(Qt.ItemIsSelectable|Qt.ItemIsEnabled)
|
|
687
|
-
item_message.setToolTip(tooltip.text())
|
|
688
|
-
self.ui.list_images.setItem(c, 2, item_message)
|
|
689
|
-
if self.INPpar.row==k and self.INPpar.col==2:
|
|
690
|
-
item_message.setSelected(True)
|
|
691
|
-
self.ui.list_images.setCurrentItem(item_message)
|
|
692
|
-
|
|
693
|
-
self.errorMessage()
|
|
694
|
-
self.ui.list_images.resizeInfoLabel()
|
|
695
|
-
return
|
|
696
|
-
|
|
697
|
-
def errorMessage(self):
|
|
698
|
-
self.INPpar.errorMessage=''
|
|
699
|
-
if not len(self.INPpar.flagImages):
|
|
700
|
-
self.INPpar.errorMessage+='Select a valid set of target image files!\n\n'
|
|
701
|
-
if not self.INPpar.FlagValidPathOut:
|
|
702
|
-
self.INPpar.errorMessage+='Choose a valid path for the output folder!\n\n'
|
|
703
|
-
if not self.INPpar.FlagValidRootOut:
|
|
704
|
-
self.INPpar.errorMessage+='Specify a valid root for the name of the output files!\n\n'
|
|
705
|
-
if any(self.INPpar.flagImages):
|
|
706
|
-
errorFiles=[[],[]]
|
|
707
|
-
for k,f in enumerate(self.INPpar.flagImages):
|
|
708
|
-
if f&3: errorFiles[0].append(self.INPpar.filenames[k])
|
|
709
|
-
elif f&4: errorFiles[1].append(self.INPpar.filenames[k])
|
|
710
|
-
if len(errorFiles[0]) or len(errorFiles[1]):
|
|
711
|
-
errorMessage=''
|
|
712
|
-
if len(errorFiles[0]):
|
|
713
|
-
errList=f";\n ".join(errorFiles[0])
|
|
714
|
-
errorMessage+=f'Define appropriately the plane parameters for the following images:\n {errList}.\n\n'
|
|
715
|
-
if len(errorFiles[1]):
|
|
716
|
-
errList=f";\n ".join(errorFiles[1])
|
|
717
|
-
errorMessage+=f'Check for missing files related to the following images:\n {errList}.'
|
|
718
|
-
#pri.Error.blue(errorMessage)
|
|
719
|
-
self.INPpar.errorMessage+=errorMessage
|
|
720
|
-
if self.INPpar.errorMessage:
|
|
721
|
-
self.INPpar.errorMessage='Please check the following issues before starting calibration!\n\n'+self.INPpar.errorMessage
|
|
722
|
-
|
|
723
|
-
def listClear(self):
|
|
724
|
-
self.ui.list_images.clear()
|
|
725
|
-
nRow=self.ui.list_images.rowCount()
|
|
726
|
-
for k in range(nRow):
|
|
727
|
-
self.ui.list_images.removeRow(self.ui.list_images.rowAt(k))
|
|
728
|
-
self.ui.list_images.setHorizontalHeaderLabels(self.tableHeaders)
|
|
729
|
-
|
|
730
|
-
def updatePlanePar(self):
|
|
731
|
-
if self.ui.list_images.currentColumn()==1:
|
|
732
|
-
r=self.ui.list_images.currentRow()
|
|
733
|
-
item=self.ui.list_images.item(r,1)
|
|
734
|
-
text=item.text()
|
|
735
|
-
oldtext=", ".join([str(s) for s in self.INPpar.plapar[r]])
|
|
736
|
-
if text!=oldtext:
|
|
737
|
-
#fex=re.compile('[+-]?([0-9]+([.][0-9]*)?|[.][0-9]+)')
|
|
738
|
-
if self.INPpar.FlagOptPlane:
|
|
739
|
-
tsplitted=re.split(',',text)
|
|
740
|
-
#pri.Callback.white(tsplitted)
|
|
741
|
-
if len(tsplitted)==6 and all([isfloat(p) for p in tsplitted]):
|
|
742
|
-
self.INPpar.plapar[r]=[float(p) for p in tsplitted]
|
|
743
|
-
else:
|
|
744
|
-
if isfloat(text):
|
|
745
|
-
self.INPpar.plapar[r]=[float(text)]
|
|
746
|
-
pri.Callback.green(f'***** new par {", ".join([str(s) for s in self.INPpar.plapar[r]])}')
|
|
747
|
-
|
|
748
|
-
#*************************************************** Output
|
|
749
|
-
#******************** path
|
|
750
|
-
def check_same_as_inp_callback(self):
|
|
751
|
-
self.INPpar.FlagSameAsInput=self.ui.check_same_as_inp.isChecked()
|
|
752
|
-
self.check_same_as_inp_action()
|
|
753
|
-
|
|
754
|
-
def check_same_as_inp_action(self):
|
|
755
|
-
if self.INPpar.FlagSameAsInput:
|
|
756
|
-
self.INPpar.pathout=self.INPpar.path
|
|
757
|
-
self.setFlagValidPathOut()
|
|
758
|
-
|
|
759
|
-
def edit_path_out_changing(self):
|
|
760
|
-
self.ui.label_check_path_out.setPixmap(QPixmap())
|
|
761
|
-
|
|
762
|
-
def edit_path_out_finished(self):
|
|
763
|
-
self.ui.edit_path_out.setText(self.INPpar.pathout)
|
|
764
|
-
self.setPathOutLabel()
|
|
765
|
-
|
|
766
|
-
def edit_path_out_callback(self):
|
|
767
|
-
currpath=myStandardPath(self.ui.edit_path_out.text())
|
|
768
|
-
directory_path = myStandardPath(os.getcwd())
|
|
769
|
-
if directory_path in currpath:
|
|
770
|
-
currpath=currpath.replace(directory_path,'./')
|
|
771
|
-
self.INPpar.pathout=currpath
|
|
772
|
-
self.setFlagValidPathOut()
|
|
773
|
-
|
|
774
|
-
def setFlagValidPathOut(self):
|
|
775
|
-
self.INPpar.FlagValidPathOut=os.path.exists(self.INPpar.pathout)
|
|
776
|
-
|
|
777
|
-
def setPathOutLabel(self):
|
|
778
|
-
if self.INPpar.FlagValidPathOut:
|
|
779
|
-
self.ui.label_check_path_out.setPixmap(self.mapv)
|
|
780
|
-
self.ui.label_check_path_out.setToolTip("This path exists! 😃")
|
|
781
|
-
else:
|
|
782
|
-
self.ui.label_check_path_out.setPixmap(self.mapx)
|
|
783
|
-
self.ui.label_check_path_out.setToolTip("This path does not exist! 😞")
|
|
784
|
-
|
|
785
|
-
def button_path_out_callback(self):
|
|
786
|
-
directory = str(QFileDialog.getExistingDirectory(self,\
|
|
787
|
-
"Choose a folder", dir=self.INPpar.pathout,options=optionNativeDialog))
|
|
788
|
-
currpath='{}'.format(directory)
|
|
789
|
-
if not currpath=='':
|
|
790
|
-
self.ui.edit_path_out.setText(currpath)
|
|
791
|
-
self.edit_path_out_callback()
|
|
792
|
-
|
|
793
|
-
#******************** root
|
|
794
|
-
def edit_root_out_changing(self):
|
|
795
|
-
self.ui.label_check_root.setPixmap(QPixmap())
|
|
796
|
-
|
|
797
|
-
def edit_root_out_finished(self):
|
|
798
|
-
self.ui.edit_root_out.setText(self.INPpar.radout)
|
|
799
|
-
self.setRootOutLabel()
|
|
800
|
-
|
|
801
|
-
def edit_root_out_callback(self):
|
|
802
|
-
entry=myStandardRoot(self.ui.edit_root_out.text())
|
|
803
|
-
self.ui.edit_root_out.setText(entry)
|
|
804
|
-
self.INPpar.radout=entry
|
|
805
|
-
self.setFlagValidRootOut()
|
|
806
|
-
|
|
807
|
-
def setFlagValidRootOut(self,*args):
|
|
808
|
-
if len(args): INPpar_prev=args[0]
|
|
809
|
-
else: INPpar_prev=self.INPpar
|
|
810
|
-
ext='.cal'
|
|
811
|
-
FlagExistPath=INPpar_prev.FlagValidPathOut
|
|
812
|
-
if FlagExistPath:
|
|
813
|
-
currpath=myStandardPath(INPpar_prev.pathout)
|
|
814
|
-
else:
|
|
815
|
-
currpath='./'
|
|
816
|
-
pattern=myStandardRoot(currpath+INPpar_prev.radout)+'*'+ext
|
|
817
|
-
FlagExist=False
|
|
818
|
-
if FlagExistPath:
|
|
819
|
-
files=findFiles_sorted(pattern)
|
|
820
|
-
FlagExist=len(files)>0
|
|
821
|
-
if FlagExist:
|
|
822
|
-
INPpar_prev.FlagValidRootOut=-2
|
|
823
|
-
else:
|
|
824
|
-
try:
|
|
825
|
-
filename=pattern.replace('*','a0')+'.delmeplease'
|
|
826
|
-
open(filename,'w')
|
|
827
|
-
except:
|
|
828
|
-
FlagDeleteFile=False
|
|
829
|
-
INPpar_prev.FlagValidRootOut=0
|
|
830
|
-
else:
|
|
831
|
-
FlagDeleteFile=True
|
|
832
|
-
INPpar_prev.FlagValidRootOut=1
|
|
833
|
-
finally:
|
|
834
|
-
if FlagDeleteFile:
|
|
835
|
-
os.remove(filename)
|
|
836
|
-
|
|
837
|
-
def setRootOutLabel(self):
|
|
838
|
-
if self.INPpar.FlagValidRootOut==-2:
|
|
839
|
-
if not self.INPpar.FlagReadCalib:
|
|
840
|
-
self.ui.label_check_root.setPixmap(self.Lab_warning)
|
|
841
|
-
self.ui.label_check_root.setToolTip("There are files with the same filename root in the selected path! 😰")
|
|
842
|
-
else:
|
|
843
|
-
self.ui.label_check_root.setPixmap(self.mapv)
|
|
844
|
-
self.ui.label_check_root.setToolTip("Filename root admitted! 😃")
|
|
845
|
-
elif self.INPpar.FlagValidRootOut==0:
|
|
846
|
-
self.ui.label_check_root.setPixmap(self.mapx)
|
|
847
|
-
self.ui.label_check_root.setToolTip("Filename root not admitted! 😞")
|
|
848
|
-
if self.INPpar.FlagValidRootOut==1:
|
|
849
|
-
self.ui.label_check_root.setPixmap(self.mapv)
|
|
850
|
-
self.ui.label_check_root.setToolTip("Filename root admitted! 😃")
|
|
851
|
-
|
|
852
|
-
if __name__ == "__main__":
|
|
853
|
-
import sys
|
|
854
|
-
app=QApplication.instance()
|
|
855
|
-
if not app:app = QApplication(sys.argv)
|
|
856
|
-
app.setStyle('Fusion')
|
|
857
|
-
object = Import_Tab_CalVi(None)
|
|
858
|
-
object.show()
|
|
859
|
-
app.exec()
|
|
860
|
-
app.quit()
|
|
861
|
-
app=None
|