PaIRS-UniNa 0.2.0__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 +39 -23
- PaIRS_UniNa/Changes.txt +127 -8
- PaIRS_UniNa/Custom_Top.py +12 -9
- PaIRS_UniNa/Explorer.py +534 -165
- PaIRS_UniNa/FolderLoop.py +562 -0
- PaIRS_UniNa/Input_Tab.py +261 -100
- PaIRS_UniNa/Input_Tab_CalVi.py +24 -25
- PaIRS_UniNa/Input_Tab_tools.py +967 -405
- PaIRS_UniNa/Output_Tab.py +324 -130
- PaIRS_UniNa/PaIRS_PIV.py +58 -1
- PaIRS_UniNa/PaIRS_pypacks.py +1415 -1039
- PaIRS_UniNa/Process_Tab.py +15 -19
- PaIRS_UniNa/Process_Tab_Disp.py +12 -5
- PaIRS_UniNa/Saving_tools.py +27 -13
- PaIRS_UniNa/TabTools.py +176 -59
- PaIRS_UniNa/Vis_Tab.py +664 -256
- PaIRS_UniNa/Vis_Tab_CalVi.py +114 -45
- PaIRS_UniNa/Whatsnew.py +58 -9
- PaIRS_UniNa/_PaIRS_PIV.pyd +0 -0
- PaIRS_UniNa/__init__.py +4 -3
- PaIRS_UniNa/addwidgets_ps.py +150 -63
- PaIRS_UniNa/calib.py +6 -3
- PaIRS_UniNa/calibView.py +19 -6
- PaIRS_UniNa/gPaIRS.py +1397 -543
- PaIRS_UniNa/icons/align_all.png +0 -0
- PaIRS_UniNa/icons/announcement.png +0 -0
- PaIRS_UniNa/icons/bugfix.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/copy_process_off.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/folder_loop_cleanup.png +0 -0
- PaIRS_UniNa/icons/folder_loop_cleanup_off.png +0 -0
- PaIRS_UniNa/icons/linked.png +0 -0
- PaIRS_UniNa/icons/logo_opaco.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/process_loop.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/restore_undo.png +0 -0
- PaIRS_UniNa/icons/save_and_stop.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_path_loop.png +0 -0
- PaIRS_UniNa/icons/scan_path_loop_off.png +0 -0
- PaIRS_UniNa/icons/show_all.png +0 -0
- PaIRS_UniNa/icons/star.png +0 -0
- PaIRS_UniNa/icons/step_inheritance.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/window.png +0 -0
- PaIRS_UniNa/listLib.py +3 -2
- PaIRS_UniNa/parForMulti.py +7 -5
- PaIRS_UniNa/parForWorkers.py +174 -140
- PaIRS_UniNa/pivParFor.py +9 -11
- PaIRS_UniNa/preProcParFor.py +4 -4
- PaIRS_UniNa/procTools.py +120 -44
- PaIRS_UniNa/rqrdpckgs.txt +9 -0
- PaIRS_UniNa/stereoPivParFor.py +16 -22
- PaIRS_UniNa/tabSplitter.py +17 -7
- PaIRS_UniNa/ui_Input_Tab.py +56 -57
- PaIRS_UniNa/ui_Input_Tab_CalVi.py +71 -64
- PaIRS_UniNa/ui_Log_Tab.py +8 -6
- PaIRS_UniNa/ui_Output_Tab.py +180 -4
- PaIRS_UniNa/ui_Process_Tab.py +19 -19
- PaIRS_UniNa/ui_Process_Tab_Disp.py +181 -10
- PaIRS_UniNa/ui_Vis_Tab.py +332 -196
- PaIRS_UniNa/ui_Whatsnew.py +13 -13
- PaIRS_UniNa/ui_gPairs.py +140 -71
- PaIRS_UniNa/ui_infoPaIRS.py +156 -31
- PaIRS_UniNa/whatsnew.txt +6 -4
- {PaIRS_UniNa-0.2.0.dist-info → pairs_unina-0.2.8.dist-info}/METADATA +62 -26
- {PaIRS_UniNa-0.2.0.dist-info → pairs_unina-0.2.8.dist-info}/RECORD +82 -54
- {PaIRS_UniNa-0.2.0.dist-info → pairs_unina-0.2.8.dist-info}/WHEEL +1 -1
- PaIRS_UniNa/icons/order.png +0 -0
- PaIRS_UniNa/icons/order_reverse.png +0 -0
- PaIRS_UniNa/icons/run_piv.png +0 -0
- PaIRS_UniNa/stereo.py +0 -685
- PaIRS_UniNa/ui_infoCalVi.py +0 -428
- PaIRS_UniNa-0.2.0.dist-info/LICENSE +0 -19
- {PaIRS_UniNa-0.2.0.dist-info → pairs_unina-0.2.8.dist-info}/top_level.txt +0 -0
PaIRS_UniNa/Process_Tab.py
CHANGED
|
@@ -352,6 +352,7 @@ class PROpar(TABpar):
|
|
|
352
352
|
WSize=[w for w in self.Vect[0]]
|
|
353
353
|
WSpac=[w for w in self.Vect[1]]
|
|
354
354
|
newist=PROpar(top_new,WSize,WSpac,self.Process,self.Step)
|
|
355
|
+
newist.copyfromfields(self,newist.parFields)
|
|
355
356
|
for f in self.fields:
|
|
356
357
|
if f not in self.IW_fields:
|
|
357
358
|
setattr(self,f,getattr(newist,f))
|
|
@@ -705,7 +706,7 @@ class Process_Tab(gPaIRS_Tab):
|
|
|
705
706
|
from .procTools import dataTreePar
|
|
706
707
|
data=dataTreePar(self.PROpar.Process,self.PROpar.Step)
|
|
707
708
|
data.setProc(PRO=self.PROpar.duplicate())
|
|
708
|
-
data.writeCfgProcPiv(filename)
|
|
709
|
+
data.writeCfgProcPiv(filename,FlagWarningDialog=True)
|
|
709
710
|
|
|
710
711
|
#******************** Settings
|
|
711
712
|
def combo_mode_set(self):
|
|
@@ -723,9 +724,8 @@ class Process_Tab(gPaIRS_Tab):
|
|
|
723
724
|
#******************** Actions
|
|
724
725
|
def edit_Wind_vectors(self,wedit:QLineEdit,wlab:QLabel):
|
|
725
726
|
text=wedit.text()
|
|
726
|
-
split_text=re.split('(\d+)', text)[1:-1:2]
|
|
727
|
+
split_text=re.split(r'(\d+)', text)[1:-1:2]
|
|
727
728
|
vect=[int(i) for i in split_text]
|
|
728
|
-
tip=QToolTip(wedit)
|
|
729
729
|
FlagEmpty=len(vect)==0
|
|
730
730
|
if FlagEmpty: FlagError=True
|
|
731
731
|
else: FlagError=not all([v>=w for v,w in zip(vect[:-1],vect[1:])])
|
|
@@ -738,21 +738,18 @@ class Process_Tab(gPaIRS_Tab):
|
|
|
738
738
|
wlab.setToolTip(message)
|
|
739
739
|
wlab.setStatusTip(message)
|
|
740
740
|
"""
|
|
741
|
-
|
|
742
|
-
tip.showText(QCursor.pos(),wlab.toolTip(),wedit,QRect(),3000)
|
|
741
|
+
QToolTip.showText(QCursor.pos(),wlab.toolTip(),wedit,QRect(),3000)
|
|
743
742
|
"""
|
|
744
743
|
else:
|
|
745
744
|
wlab.setPixmap(QPixmap())
|
|
746
|
-
tip.hideText()
|
|
747
745
|
self.PROpar.VectFlag[self.Vect_widgets.index(wedit)]=not FlagError
|
|
748
|
-
return split_text, vect,
|
|
746
|
+
return split_text, vect, FlagError
|
|
749
747
|
|
|
750
748
|
def set_Wind_vectors(self,wedit:QLineEdit,wlab:QLabel,i):
|
|
751
|
-
_, vect,
|
|
752
|
-
self.set_Wind_vectors_new(i,vect,
|
|
749
|
+
_, vect, FlagError=self.edit_Wind_vectors(wedit,wlab)
|
|
750
|
+
self.set_Wind_vectors_new(i,vect,FlagError)
|
|
753
751
|
|
|
754
|
-
def set_Wind_vectors_new(self,i,vect,
|
|
755
|
-
#tip.hideText()
|
|
752
|
+
def set_Wind_vectors_new(self,i,vect,FlagError=False):
|
|
756
753
|
if not FlagError:
|
|
757
754
|
Nit_i=len(vect)
|
|
758
755
|
if Nit_i>self.PROpar.Nit:
|
|
@@ -942,7 +939,7 @@ class Process_Tab(gPaIRS_Tab):
|
|
|
942
939
|
pickle.dump(self.PROpar,file)
|
|
943
940
|
pri.Info.blue(f'Saving custom process file {filename}')
|
|
944
941
|
except Exception as inst:
|
|
945
|
-
pri.Error.red(f'Error while saving custom process file {filename}:\n{traceback.
|
|
942
|
+
pri.Error.red(f'Error while saving custom process file {filename}:\n{traceback.format_exc()}\n\n{inst}')
|
|
946
943
|
text=''
|
|
947
944
|
return text
|
|
948
945
|
|
|
@@ -1177,7 +1174,7 @@ class Process_Tab(gPaIRS_Tab):
|
|
|
1177
1174
|
|
|
1178
1175
|
#******************** Settings
|
|
1179
1176
|
def combo_TypeMed_set(self):
|
|
1180
|
-
self.ui.w_MedTest_eps.setVisible(self.PROpar.TypeMed==1)
|
|
1177
|
+
self.ui.w_MedTest_eps.setVisible(self.PROpar.TypeMed==1 and self.PROpar.FlagMedTest)
|
|
1181
1178
|
|
|
1182
1179
|
#******************** Layout
|
|
1183
1180
|
def setPROlayout_Valid(self):
|
|
@@ -1192,7 +1189,7 @@ class Process_Tab(gPaIRS_Tab):
|
|
|
1192
1189
|
self.ui.w_MedTest_ker.setVisible(self.PROpar.FlagMedTest)
|
|
1193
1190
|
self.ui.w_MedTest_alfa.setVisible(self.PROpar.FlagMedTest)
|
|
1194
1191
|
self.ui.w_MedTest_jump.setVisible(self.PROpar.FlagMedTest)
|
|
1195
|
-
self.ui.w_MedTest_eps.setVisible(self.PROpar.TypeMed==1)
|
|
1192
|
+
self.ui.w_MedTest_eps.setVisible(self.PROpar.TypeMed==1 and self.PROpar.FlagMedTest)
|
|
1196
1193
|
|
|
1197
1194
|
def showSNTestwid(self):
|
|
1198
1195
|
self.ui.label_SNTest.setVisible(self.PROpar.FlagSNTest)
|
|
@@ -1294,7 +1291,7 @@ class Process_Tab(gPaIRS_Tab):
|
|
|
1294
1291
|
|
|
1295
1292
|
def line_edit_IW_action(self):
|
|
1296
1293
|
text=self.ui.line_edit_IW.text()
|
|
1297
|
-
split_text=re.split('(\d+)', text)[1:-1:2]
|
|
1294
|
+
split_text=re.split(r'(\d+)', text)[1:-1:2]
|
|
1298
1295
|
vect=[int(split_text[i]) for i in (0,2,1,3)]
|
|
1299
1296
|
if len(vect)==4:
|
|
1300
1297
|
k=self.PROpar.row
|
|
@@ -1364,10 +1361,9 @@ class Process_Tab(gPaIRS_Tab):
|
|
|
1364
1361
|
item.setStatusTip('')
|
|
1365
1362
|
|
|
1366
1363
|
message='No context menu available! Please, pause processing.'
|
|
1367
|
-
tip=QToolTip(self)
|
|
1368
1364
|
toolTipDuration=self.toolTipDuration()
|
|
1369
1365
|
self.setToolTipDuration(3000)
|
|
1370
|
-
|
|
1366
|
+
QToolTip.showText(QCursor.pos(),message)
|
|
1371
1367
|
self.setToolTipDuration(toolTipDuration)
|
|
1372
1368
|
item.setToolTip(toolTip)
|
|
1373
1369
|
item.setStatusTip(toolTip)
|
|
@@ -1402,8 +1398,8 @@ class Process_Tab(gPaIRS_Tab):
|
|
|
1402
1398
|
item.set_fontsize(self.font().pixelSize())
|
|
1403
1399
|
self.fig_MTF.tight_layout()
|
|
1404
1400
|
|
|
1405
|
-
self.
|
|
1406
|
-
self.fig_MTF.canvas.mpl_connect('close_event', lambda e: self.
|
|
1401
|
+
self.gui.setEnabled(False)
|
|
1402
|
+
self.fig_MTF.canvas.mpl_connect('close_event', lambda e: self.gui.setEnabled(True))
|
|
1407
1403
|
self.fig_MTF.canvas.manager.set_window_title('Modulation Transfer Function')
|
|
1408
1404
|
self.fig_MTF.canvas.manager.window.setWindowIcon(self.windowIcon())
|
|
1409
1405
|
self.fig_MTF.show()
|
PaIRS_UniNa/Process_Tab_Disp.py
CHANGED
|
@@ -8,6 +8,8 @@ spin_tips={
|
|
|
8
8
|
'SemiWidth_Epipolar' : 'Semi-width normal to epipolar line',
|
|
9
9
|
'Filter_SemiWidth' : 'Semi-width of filter',
|
|
10
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',
|
|
11
13
|
}
|
|
12
14
|
check_tips={}
|
|
13
15
|
radio_tips={}
|
|
@@ -49,6 +51,8 @@ class PROpar_Disp(TABpar):
|
|
|
49
51
|
self.Filter_SemiWidth = 10
|
|
50
52
|
self.Threshold = 0.5
|
|
51
53
|
|
|
54
|
+
self.Nit_OutDet = 5
|
|
55
|
+
self.Std_Threshold = 3.0
|
|
52
56
|
|
|
53
57
|
class Process_Tab_Disp(gPaIRS_Tab):
|
|
54
58
|
class Process_Tab_Signals(gPaIRS_Tab.Tab_Signals):
|
|
@@ -105,7 +109,6 @@ class Process_Tab_Disp(gPaIRS_Tab):
|
|
|
105
109
|
if flagInit:
|
|
106
110
|
self.initialize()
|
|
107
111
|
|
|
108
|
-
|
|
109
112
|
def initialize(self):
|
|
110
113
|
pri.Info.yellow(f'{"*"*20} PROCESS Disp initialization {"*"*20}')
|
|
111
114
|
self.setTABpar(FlagAdjustPar=True,FlagBridge=False)
|
|
@@ -115,21 +118,25 @@ class Process_Tab_Disp(gPaIRS_Tab):
|
|
|
115
118
|
#*************************************************** Adjusting parameters
|
|
116
119
|
def adjustPROpar(self):
|
|
117
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)])
|
|
118
123
|
self.ui.spin_SemiWidth_Epipolar.setMaximum(int(minIWSize/4))
|
|
119
124
|
self.ui.spin_Filter_SemiWidth.setMaximum(int(minIWSize/4))
|
|
120
125
|
return
|
|
121
|
-
|
|
122
|
-
|
|
126
|
+
|
|
123
127
|
#*************************************************** Layout
|
|
124
128
|
def setPROlayout(self):
|
|
129
|
+
self.ui.w_Std_Threshold.setVisible(self.PROpar.Nit_OutDet>0)
|
|
125
130
|
return
|
|
126
131
|
|
|
127
132
|
#*************************************************** Windowing and Correlation
|
|
128
133
|
#******************** Actions
|
|
129
134
|
def line_edit_IW_action(self):
|
|
130
135
|
text=self.ui.line_edit_IW.text()
|
|
131
|
-
split_text=re.split('(\d+)', text)[1:-1:2]
|
|
132
|
-
|
|
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)]
|
|
133
140
|
FlagValid=len(vect)==4 and all([v>0 for v in vect])
|
|
134
141
|
if FlagValid:
|
|
135
142
|
self.PROpar.Vect=vect
|
PaIRS_UniNa/Saving_tools.py
CHANGED
|
@@ -143,7 +143,7 @@ def save_list_to_file_serialized(l, filename, flagJSON=False):
|
|
|
143
143
|
print(f'Error while saving the file {filename}!\n{e}\n')
|
|
144
144
|
|
|
145
145
|
if pickle_counter:
|
|
146
|
-
pri.
|
|
146
|
+
pri.IOError.yellow(f'The following non-json serializable items were found in {filename}:\n'+"\n".join(info_pickle))
|
|
147
147
|
pickle_filename = basename+'.pairs_data'
|
|
148
148
|
try:
|
|
149
149
|
with open(pickle_filename, 'wb') as file:
|
|
@@ -170,29 +170,35 @@ def load_list_from_file_serialized(filename):
|
|
|
170
170
|
else:
|
|
171
171
|
file.seek(0)
|
|
172
172
|
try:
|
|
173
|
+
import numpy
|
|
173
174
|
serialized_list=pickle.load(file)
|
|
174
175
|
except Exception as e:
|
|
175
176
|
error=e
|
|
176
177
|
except Exception as e:
|
|
177
178
|
error=e
|
|
178
179
|
if error:
|
|
179
|
-
|
|
180
|
-
return serialized_list
|
|
180
|
+
pri.IOError.red(f'Error while loading the file {filename}!\n{error}\n')
|
|
181
|
+
return serialized_list, str(error)
|
|
181
182
|
|
|
183
|
+
error=''
|
|
182
184
|
pickle_data = None
|
|
183
185
|
if os.path.exists(pickle_filename):
|
|
184
186
|
try:
|
|
185
187
|
with open(pickle_filename, 'rb') as file:
|
|
186
188
|
pickle_data = pickle.load(file)
|
|
187
189
|
except Exception as e:
|
|
188
|
-
|
|
190
|
+
pri.IOError.red(f'Error while loading the file {pickle_filename}!\n{e}\n')
|
|
191
|
+
error+=str(e)
|
|
189
192
|
|
|
190
193
|
info_pickle=[]
|
|
191
194
|
|
|
192
195
|
def deserialize_element(data):
|
|
193
196
|
if data is None:
|
|
194
|
-
return None
|
|
195
|
-
|
|
197
|
+
return None
|
|
198
|
+
try:
|
|
199
|
+
cls_name = data.pop('parClass')
|
|
200
|
+
except:
|
|
201
|
+
pass
|
|
196
202
|
cls = globals()[cls_name]
|
|
197
203
|
if cls_name=='dataTreePar':
|
|
198
204
|
pass
|
|
@@ -222,7 +228,7 @@ def load_list_from_file_serialized(filename):
|
|
|
222
228
|
else:
|
|
223
229
|
setattr(new_instance,f,v_loaded)
|
|
224
230
|
except Exception as e:
|
|
225
|
-
pri.
|
|
231
|
+
pri.IOError.red(f'Error while reading the file {filename} (setting "{key}" field of {cls_name} item)\n{traceback.format_exc()}\n')
|
|
226
232
|
fields[key] = new_instance
|
|
227
233
|
elif isinstance(value, dict) and '__file_ref__' in value:
|
|
228
234
|
ref_key = value['__file_ref__']
|
|
@@ -247,8 +253,14 @@ def load_list_from_file_serialized(filename):
|
|
|
247
253
|
return deserialize_element(lst)
|
|
248
254
|
|
|
249
255
|
if info_pickle:
|
|
250
|
-
pri.
|
|
251
|
-
|
|
256
|
+
pri.IOError.red(f'The following non-json serializable items were not found in {filename}:\n'+"\n".join(info_pickle))
|
|
257
|
+
l=None
|
|
258
|
+
try:
|
|
259
|
+
l=deserialize_list(serialized_list)
|
|
260
|
+
except Exception as e:
|
|
261
|
+
pri.IOError.red(f'Error while loading the file {filename}!\n{e}\n{traceback.format_exc()}\n')
|
|
262
|
+
error+=str(e)
|
|
263
|
+
return l, error
|
|
252
264
|
|
|
253
265
|
def is_non_json_serializable(value):
|
|
254
266
|
try:
|
|
@@ -265,18 +277,20 @@ def save_list_to_file(l,filename):
|
|
|
265
277
|
except Exception as e:
|
|
266
278
|
print(f'Error while saving the file {filename}!\n{e}\n')
|
|
267
279
|
|
|
268
|
-
def
|
|
280
|
+
def load_list_from_file(filename):
|
|
269
281
|
l=None
|
|
282
|
+
errorMessage=''
|
|
270
283
|
try:
|
|
271
284
|
with open(filename, 'rb') as file:
|
|
272
285
|
l=pickle.load(file)
|
|
273
286
|
except Exception as e:
|
|
274
|
-
|
|
275
|
-
|
|
287
|
+
errorMessage=f'Error while loading the file {filename}!\n{e}\n'
|
|
288
|
+
pri.IOError.red(errorMessage)
|
|
289
|
+
return l, errorMessage
|
|
276
290
|
|
|
277
291
|
if FLAG_SERIALIZED:
|
|
278
292
|
saveList=save_list_to_file_serialized
|
|
279
293
|
loadList=load_list_from_file_serialized
|
|
280
294
|
else:
|
|
281
295
|
saveList=save_list_to_file
|
|
282
|
-
loadList=
|
|
296
|
+
loadList=load_list_from_file
|