Hi guys
Since this is my frankestein, I'll try to aswer you questions

Doh! That makes little sense, frankly. I would want the map to indicate where the fixes should be applied. You do that with non-zero values in an otherwise dark image. Oh well smile
It is just a matter of how you interpret the data. You may just as well think as a defect map the other way around. 1 is good data, 0 is bad data

Also, there is a little practical reason behind this. To calculate the kernel for the convolution or morphological filter (for each pixel a new kernel) it is better to interpret the defect map locally as this kernel (for every neighborhood). So, 0 pixels values means that they are not considered in the operation. In fact, this point of view enables to use gray pixels partially, as weighting factors in the kernel calculation. So, if you force the users to give a image "ready for inner use", there is a gain in processing speed. You don't have to invert the image every time you try the process.
Now, the problem is how to prepare the defect map.
The most direct approach is with a pixel inversion (Invert process), and then either use HistogramTransform or Binarice processes. The later just sets a threshold value, where the result is a black or image image depending at which side of the threshold is the original value. Almost the same as setting the low and high clip in HT in the same point. If you don't want to use different weights (only for convolutions), just use the binarization.
And that's all... a bit odd, maybe, but works really fine (in my tests, at least)

A script may automatize the defect map generation from a dark frame, and then use this process, if you want to perform batch processing, or just leave it to do all the calibration stuff without much interaction. As some of you know, I'm more a "Divide & Conquer" guy than "Do it All at Once"...