Pixelmath - no rescale, no truncate

phenrotay

Active member
In pixelmath, allow to not rescale nor truncate the result.
This is currently possible but needs the creation of a process icon and editing the script.
Could the user interface be modified for this (check box?)
Pierre
 
I don't know how that should work. To my knowledge, if in PixelMath the result is not rescaled, it will always be truncated. E.g. there is no way to preserve negative values in the resulting image. If you don't want to loose data in the low range and don't want to rescale, you will have to add a small pedestal. This implies the risk of loosing some data in the high range though.

Bernd
 
In pixelmath, allow to not rescale nor truncate the result.
I'm not sure that I understand the ask.

If an arithmetic operation overflows the pixel value, what do you actually expect to happen? Other than truncating or rescaling, I can't think of a third option, except to possibly keep the least significant bits of the overflow, but I don't see why you'd want that.

Or I suppose that you could have it throw an error in this case...
 
In pixelmath, allow to not rescale nor truncate the result.
This is currently possible but needs the creation of a process icon and editing the script.
Could the user interface be modified for this (check box?)
Pierre

Hi Pierre,

Sorry, but the answer is no. The truncate parameter of PixelMath is hidden and will continue being that way for now. We already have enough problems to solve :)

If you really want to execute a PixelMath instance with both rescaling and truncation disabled, you'll have to edit the instance's source code to manually set truncate=false. As you should know, platform stability is not guaranteed if out-of-range floating point pixel sample values propagate after a process execution. For example, if your PixelMath expressions generate pixel values such as -1 and you disable rescaling and truncation, then don't complain if the image in question is represented weirdly on the the screen, or if you get a crash.
 
Back
Top