Merged
Merge Request #30 · created by Mahsa Lotfollahi


changes in stretch function

stretch function in image.h has been changed. It needed to be added by desired minimum.


From stretch_function into master

Merged by David Mayerich

2 participants

stim/image/image.h
... ... @@ -403,7 +403,7 @@ public:
403 403 double range = maxval - minval; //calculate the current range of the image
404 404 double desired_range = high - low; //calculate the desired range of the image
405 405 for (size_t n = 0; n < N; n++) { //for each element in the image
406   - result.data()[n] = desired_range * (img[n] - minval) / range;
  406 + result.data()[n] = desired_range * (img[n] - minval) / range + low;
407 407 }
408 408 return result;
409 409 }
... ...
test.txt 0 → 100644