isis-group/isis — Issue #43: type conversion on empty images is broken
Author: DerOrfa
Created: 2011-12-09 15:49:56+00:00
State: open
Labels: Core

Calling isisconv at any image with only one value (mostly considered "empty" :-) ) and a scaling conversion into another type is done, it will crash.

Example:

```terminal
isisconv -in /scr/mrincoming7t/PostMortem/PMB100520.PostMortem/nifti/S102_MEAN_mp2rage_7T_0_35_96Avg_T1map.nii -out test.png
```
aborts with the Assertion "minval < maxval" failing in `isis::data::getNumericScaling`.

This is actually more troublesome than it might look like. (And a little bit embarrassing - shame on me)

We need minval to be less than maxval to calculate the scaling. And we need the scaling, to make sure the data will fit into the target type (even if there is only one distinct value).