[NeXus-code-tickets] [NeXusCode] #226: Save a NeXus file with chunking and no compression
NeXus Data Format Library and Applications
noreply at nexusformat.org
Tue Mar 23 07:33:23 GMT 2010
#226: Save a NeXus file with chunking and no compression
---------------------------+------------------------------------------------
Reporter: Pedro.vicente | Owner: Pedro.vicente
Type: enhancement | Status: new
Priority: major | Milestone: 4.3.0
Component: napi | Version: 4.2.0
Keywords: |
---------------------------+------------------------------------------------
PROPOSED SOLUTION (HDF5)
1) define a new symbol NX_CHUNK
{{{
/* Map NeXus compression methods to HDF compression methods */
#define NX_CHUNK 0
#define NX_COMP_NONE 100
#define NX_COMP_LZW 200
#define NX_COMP_RLE 300
#define NX_COMP_HUF 400
}}}
2) the same for the C++ binding
{{{
enum NXcompression {
CHUNK = NX_CHUNK,
NONE = NX_COMP_NONE,
LZW = NX_COMP_LZW,
RLE = NX_COMP_RLE,
HUF = NX_COMP_HUF
};
}}}
3) modify NX5compmakedata to handle this case
{{{
else if (compress_type == NX_CHUNK)
{
cparms = H5Pcreate(H5P_DATASET_CREATE);
iNew = H5Pset_chunk(cparms,rank,chunkdims);
if (iNew < 0)
{
NXIReportError (NXpData, "ERROR: Size of chunks could not be
set!");
return NX_ERROR;
}
iRet = H5Dcreate (pFile->iCurrentG, (char*)name, datatype1,
dataspace, cparms);
}
}}}
--
Ticket URL: <http://trac.nexusformat.org/code/ticket/226>
NeXus Data Format Library and Applications <http://www.nexusformat.org/>
NeXus Data Format Library and Applications
More information about the NeXus-code-tickets
mailing list