[MINC-users] mincmorph output data type

Andrew Janke a.janke at gmail.com
Wed Feb 16 19:36:25 EST 2011


Hi Claude,

On Thu, Feb 17, 2011 at 04:27, Claude LEPAGE <claude at bic.mni.mcgill.ca> wrote:
> Any reason why mincmorph is always writing its output in signed float?
>
> Here is the code:
> #define INTERNAL_PREC NC_FLOAT         /* should be NC_FLOAT or NC_DOUBLE */
>
>   output_modified_volume(op->outfile, MI_ORIGINAL_TYPE, 0,
>                          // dtype, is_signed,
>                          0.0, 0.0, *volume, infile, arg_string, NULL);
>
> The input is always read internally in float, thus MI_ORIGINAL_TYPE gives
> float on output, regardless of what the user wants.

Looks to me like you have a non-released version?  Or some errant
package from somewhere. Are you building from CVS or something? I say
this if only because as a die-hard habit I used C++ style comments in
code when fiddling with things and make a concerted effort to remove
all such things before a release.

> Why has someone chosen to ignore dtype as specified by the user? Any good
> reason to do so? I can almost think of one, which is related to what I'm
> trying to do. When using -group, the number of groups could exceed the
> storage capacity of the integer data type (byte or short).

Correct, this was why I added the option for an output datatype
originally. Before adding the group option there was little reason to
have any other output type to -byte. But then I added grey-scale
erosion/dilation and a bunch of other things. :)

Certainly the most current version isn't like this:

   https://github.com/andrewjanke/mincmorph/blob/master/mincmorph.c#L592


-- 
Andrew Janke
(a.janke at gmail.com || http://a.janke.googlepages.com/)
Brisbane->Australia    +61 (402) 700 883


More information about the MINC-users mailing list