[Nexus-developers] data type for binary data
Pete Jemian
prjemian at gmail.com
Wed Dec 7 14:36:44 GMT 2011
+1 the proposition of a new NX_OPAQUE, leaving NX_BINARY as-is.
NX_BINARY is used as a value of an attribute. As such we can't mark it
with a "deprecated" attribute. BUT, we can indicate in its optional
documentation string (in case anyone notices this bit of text) that its
use is deprecated and offer NX_OPAQUE as the new term to be used.
Pete
On 12/7/2011 7:09 AM, Eugen Wintersberger wrote:
> Tobias' approach sounds good for me. Maybe it is a good idea to mark
> NX_BINARY as deprecated (is there some feature for this in NAPI?) as
> I think it should be omitted in future.
>
> regards
> Eugen
>
> On Wed, 2011-12-07 at 11:04 +0000, Tobias.Richter at diamond.ac.uk wrote:
>> Hi Freddie,
>>
>> I'd propose to leave NX_BINARY alone and just add NX_OPAQUE.
>> Does not break any existing files or code. And developers can switch to the new functionality when ever they want.
>> They are only ever forced to change if they want to read a file with NX_OPAQUE. The only Nexus class that requires NX_BINARY is the data in NXnote as far as I can see. We should be able to allow NX_OPAQUE in there as well then.
>>
>> Regards,
>>
>> Tobias
>> ________________________________________
>> From: nexus-developers-bounces at nexusformat.org [nexus-developers-bounces at nexusformat.org] on behalf of freddie.akeroyd at stfc.ac.uk [freddie.akeroyd at stfc.ac.uk]
>> Sent: 07 December 2011 01:10
>> To: nexus-developers at nexusformat.org
>> Subject: Re: [Nexus-developers] data type for binary data
>>
>> Hi Eugen,
>>
>> I think it would be good if we could use the HDF5 binary type as it properly distinguishes "UInt8" and "binary data", but we would need to add some support into NeXus to handle such data via the API and there are some compatibility issue we need to assess too.
>>
>> If we change NX_BINARY to Opaque, then a recompiled nexus program that reads a previously written binary array (UInt8) and checked its type was "NX_BINARY" would fail. Similarly a newly compiled program writing NX_BINARY to read in by an hdf5 aware non-nexus program may find that changing from UInt8 to OPAQUE breaks something there. If we think these are likely, then one option is to remove NX_BINARY and add NX_OPAQUE instead - programs using NX_BINARY would then fail to compile and must decide on UInt8 or opaque (purely relinked programs would still work though via the previous UInt8 definition). What do people think?
>>
>> Regards,
>>
>> Freddie
>>
>> -----Original Message-----
>> From: nexus-developers-bounces at nexusformat.org [mailto:nexus-developers-bounces at nexusformat.org] On Behalf Of Eugen Wintersberger
>> Sent: 05 December 2011 10:15
>> To: nexus-developers at nexusformat.org
>> Subject: [Nexus-developers] data type for binary data
>>
>> Hi folks
>> I am actually implementing the binary field type for my C++ API.
>> According to the Nexus documentation binary data is stored as UInt8
>> which has historical reasons.
>> HDF5 provides now an opaque data type which indicates already on HDF5
>> level that the data is uninterpreted binary. Thus I would rather use
>> this data type than UInt8.
>> Is this ok according to Nexus or shall I use UInt8 for backward
>> compatibility?
>>
>> regards
>> Eugen
>>
>> _______________________________________________
>> NeXus-developers mailing list
>> NeXus-developers at nexusformat.org
>> http://lists.nexusformat.org/mailman/listinfo/nexus-developers
>> --
>> Scanned by iCritical.
>>
>> _______________________________________________
>> NeXus-developers mailing list
>> NeXus-developers at nexusformat.org
>> http://lists.nexusformat.org/mailman/listinfo/nexus-developers
>>
>
>
> _______________________________________________
> NeXus-developers mailing list
> NeXus-developers at nexusformat.org
> http://lists.nexusformat.org/mailman/listinfo/nexus-developers
More information about the NeXus-developers
mailing list