Closed dkazanc closed 1 month ago
HTTomo solution: One possible solution is to make rescale_to_int
to be a part of image_saver, however, then it must become a CPU method.
Another solution is to make rescale_to_int
insertable before save_to_images
in HTTomo automatically based on the
parameters given in the save_to_images
. Slightly fiddly but the obvious thing here is that those methods need to know about the existence of each other so to avoid duplications of operations. Any other ideas?
Currently there is an ambiguity between the calculation of the percentile and the percentage when the
glob_stats
argument is provided OR not. Two different scaling approaches are somewhat unified.It makes things even more confusing because of the dependency on the
glob_stats
argument and data rescaler function in httomolibgpu package. This rescaling function might be used beforesave_to_images
and then there is no need to provideglob_stats
to image saver to rescale the rescaled data again! However, when theglob_stats
argument is NOT provided, we then use a time consuming percentile rescaling without any need for it.Also if you rescaled once with
rescale_to_int
and then provideglob_stats
tosave_to_images
, you will rescale your data again, incorrectly, I believe.