On Fri, 9 Jun 2006, Peter W. Draper wrote:
>
> Hi Andy,
>
> the data type given to ndfMap doesn't need to match that of the underlying
> data, it's a requested type, not the data type. NDF takes care of converting
> to the type you asked for, and converting it back when the data is released
> (write or update access). So this is a valid operation. Now if you'd tried to
> do an "ndfStype" on a quality component, then that would throw an error as
> the underlying data type cannot be modified.
>
> Cheers,
>
> Peter.
Hi Peter,
OK NDF handles the conversion to/from `caller-space' so it's still
really written as _UBYTE in the file no matter what you try and do. I
suppose calling ndfStype immediately after ndfMap could be used for
error checking (but then so could a manual check on dtype before
calling ndfMap).
I just re-read the documentation:
- The result of mapping the QUALITY component with a data type other
than '_UBYTE' is not defined and should not be used.
So it's a case of `user beware' - if you make a mistake things could
go wrong without you knowing why.
Cheers,
Andy
|