PiMaV / BLITZ

*B*ulk *L*oading and *I*nteractive *T*ime series *Z*onal analysis
GNU General Public License v3.0
7 stars 0 forks source link

improved default folder settings #56

Open PiMaV opened 3 weeks ago

PiMaV commented 3 weeks ago

We should think about some kind of "auto-save-load" settings funciton. That means, if the checkbox is active, we look for a settings file in the folder and load it (with LUT, Mask, maybe even Normalization settings and apply) with the data, as well as save it in the folder when something is changed on the fly

PiMaV commented 1 week ago

there might have been a misunderstanding: I thought it would be a good idea to have an ini - file per folder. So to load and reapply folder settings each time im loading a folder; not from the "master" ini, but an ini file that is within the iamge folder and just has the image + loading related parameters within the file

irkri commented 6 days ago

I now understand. The last commit did fix it. If the checkbox is checked, we now save ini files at the loaded dataset locations and update all settings with it. There are also options to save the ini file manually under Project->Save or Project->Save as.

PiMaV commented 22 hours ago

This somehow does not work properly. I'm drag & dropping a folder "max". after some changes, the max.ini is created correctly like this:

[window]
relative_size=1
docks=@Variant(\0\0\0\b\0\0\0\x2\0\0\0\b\0m\0\x61\0i\0n\0\0\0\x7f\0\0\0\xePyQt_PyObject\0\0\0\x1\x14\x80\x4\x95\t\x1\0\0\0\0\0\0\x8c\bvertical\x94]\x94(\x8c\nhorizontal\x94]\x94(h\0]\x94(\x8c\x4\x64ock\x94\x8c\rFile Metadata\x94}\x94\x87\x94h\x5\x8c\x6V Plot\x94}\x94\x87\x94\x65}\x94\x8c\x5sizes\x94]\x94(K\xd8M_\x3\x65s\x87\x94h\0]\x94(h\x5\x8c\x6H Plot\x94}\x94\x87\x94h\x5\x8c\fImage Viewer\x94}\x94\x87\x94\x65}\x94h\r]\x94(K\xd8M_\x3\x65s\x87\x94h\0]\x94(h\x5\x8c\aOptions\x94}\x94\x87\x94h\x5\x8c\x3LUT\x94}\x94\x87\x94\x65}\x94h\r]\x94(M\xb0\x1M\x87\x2\x65s\x87\x94\x65}\x94h\r]\x94(M>\x1Mr\aM>\x1\x65s\x87\x94h\x5\x8c\bTimeline\x94}\x94\x87\x94\x65}\x94h\r]\x94(M@\x4K\xd9\x65s\x87\x94.\0\0\0\n\0\x66\0l\0o\0\x61\0t\0\0\0\t\0\0\0\0)

[viewer]
ROI_on_drop_threshold=500000
LUT="@Variant(\0\0\0\b\0\0\0\x3\0\0\0\b\0m\0o\0\x64\0\x65\0\0\0\n\0\0\0\b\0m\0o\0n\0o\0\0\0\f\0l\0\x65\0v\0\x65\0l\0s\0\0\0\x7f\0\0\0\xePyQt_PyObject\0\0\0\0\x19\x80\x4\x95\xe\0\0\0\0\0\0\0K\0G@o\xe0\0\0\0\0\0\x86\x94.\0\0\0\x10\0g\0r\0\x61\0\x64\0i\0\x65\0n\0t\0\0\0\b\0\0\0\x3\0\0\0\x18\0t\0i\0\x63\0k\0s\0V\0i\0s\0i\0\x62\0l\0\x65\0\0\0\x1\0\0\0\0\n\0t\0i\0\x63\0k\0s\0\0\0\t\0\0\x1\0\0\0\0\x7f\0\0\0\xePyQt_PyObject\0\0\0\0\x81\x80\x4\x95v\0\0\0\0\0\0\0\x8c\x15numpy.core.multiarray\x94
...

now closing the BLITZ; the ini stays the same (I see no change). Restarting however leads to fresh settings and the max.ini file is overwritten:

[window]
relative_size=0.85
docks=@Variant(\0\0\0\b\0\0\0\x2\0\0\0\b\0m\0\x61\0i\0n\0\0\0\x7f\0\0\0\xePyQt_PyObject\0\0\0\x1\x14\x80\x4\x95\t\x1\0\0\0\0\0\0\x8c\bvertical\x94]\x94(\x8c\nhorizontal\x94]\x94(h\0]\x94(\x8c\x4\x64ock\x94\x8c\rFile Metadata\x94}\x94\x87\x94h\x5\x8c\x6V Plot\x94}\x94\x87\x94\x65}\x94\x8c\x5sizes\x94]\x94(K\xb9M\xe3\x2\x65s\x87\x94h\0]\x94(h\x5\x8c\x6H Plot\x94}\x94\x87\x94h\x5\x8c\fImage Viewer\x94}\x94\x87\x94\x65}\x94h\r]\x94(K\xb9M\xe3\x2\x65s\x87\x94h\0]\x94(h\x5\x8c\aOptions\x94}\x94\x87\x94h\x5\x8c\x3LUT\x94}\x94\x87\x94\x65}\x94h\r]\x94(Mr\x1M*\x2\x65s\x87\x94\x65}\x94h\r]\x94(M\xe\x1MR\x6M\xe\x1\x65s\x87\x94h\x5\x8c\bTimeline\x94}\x94\x87\x94\x65}\x94h\r]\x94(M\xa5\x3K\xba\x65s\x87\x94.\0\0\0\n\0\x66\0l\0o\0\x61\0t\0\0\0\t\0\0\0\0)

[viewer]
ROI_on_drop_threshold=500000
LUT="@Variant(\0\0\0\b\0\0\0\x3\0\0\0\b\0m\0o\0\x64\0\x65\0\0\0\n\0\0\0\b\0m\0o\0n\0o\0\0\0\f\0l\0\x65\0v\0\x65\0l\0s\0\0\0\x7f\0\0\0\xePyQt_PyObject\0\0\0\0\x19\x80\x4\x95\xe\0\0\0\0\0\0\0K\0G@o\xe0\0\0\0\0\0\x86\x94.\0\0\0\x10\0g\0r\0\x61\0\x64\0i\0\x65\0n\0t\0\0\0\b\0\0\0\x3\0\0\0\x18\0t\0i\0\x63\0k\0s\0V\0i\0s\0i\0\x62\0l\0\x65\0\0\0\x1\0\0\0\0\n\0t\0i\0\x63\0k\0s\0\0\0\t\0\0\x1\0\0\0\0\x7f\0\0\0\xePyQt_PyObject\0\0\0\0\x81\x80\x4\x95v\0\0\0\0\0\0\0\x8c\x15numpy.core.multiarray\x94
...
irkri commented 21 hours ago

There again was a slight misunderstanding, but it should be fixed now. Before the last commit, you had to explicitly drag & drop the ini file, not the corresponding folder/file. I now changed it so that the ini file automatically gets loaded when the folder/file is loaded.