class OMX::OMXAttr
A Class to read and return the OMX
version and shape (number of zones) attribute
Public Class Methods
new(file)
click to toggle source
# File lib/OpenMatriX.rb, line 190 def initialize(file) @id = file.id end
Public Instance Methods
getVersion()
click to toggle source
A function to return the OMX
Version number
# File lib/OpenMatriX.rb, line 195 def getVersion() aid = basic_openattr(@id,"OMX_VERSION") attrOut = FFI::MemoryPointer.new(H5Types.hsize_t) sv = get_type(aid) oo = basic_readattr(aid,sv,attrOut) raise InvalidFile.new("OMX_VERSION Attribute not found") if oo < 0 return(attrOut.read_string()) end
getZones()
click to toggle source
A function to return the number of zones
# File lib/OpenMatriX.rb, line 205 def getZones() aid = basic_openattr(@id,"SHAPE") attrOut = FFI::MemoryPointer.new(H5Types.hsize_t) sv = get_type(aid) oo = basic_readattr(aid,sv,attrOut) raise InvalidFile.new("SHAPE Attribute not found") if oo < 0 return(attrOut.read_int()) end