the proper flag is set by the constructor
<pre>
Mat hdr(dims, size.p, type(), u->data + offset, step.p);
</pre>