[MINC-users] pyminc and hdf5

Leila Baghdadi baghdadi at phenogenomics.ca
Tue Apr 3 10:00:28 EDT 2012


Hi Mishkin,

I suspect this is a problem with the hdf5 installation on your machine and not pyminc.

I just downloaded your file and it runs file on my machine (ubuntu Lucid),
libhdf5-serial 1.8.4-5 

baghdadi at mouse30:/projects/souris/baghdadi$ python
Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41) 
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from pyminc.volumes.factory import *
>>> infile=volumeFromFile('/micehome/baghdadi/t1.minc2.posdir.mnc')
>>> outfile=volumeLikeFile('/micehome/baghdadi/t1.minc2.posdir.mnc','/micehome/baghdadi/copy.mnc')
>>> outfile.writeFile()
>>> outfile.closeVolume()
>>> infile.closeVolume()


Leila

----- Original Message -----
From: Mishkin Derakhshan <mishkind at gmail.com>
Sent: Mon, 4/2/2012 6:50pm
To: MINC users mailing list <minc-users at bic.mni.mcgill.ca>
Subject: [MINC-users] pyminc and hdf5

Hi,

I am getting this HDF5 warning/error when I try to run a very simple
python program using pyminc:

The minimal program that creates the error:
#! /usr/bin/python
import pyminc.volumes.factory as pyminc
inputfilename = "t1.minc2.posdir.mnc"
outputfilename = "copy.mnc"
infile = pyminc.volumeFromFile(inputfilename)
outfile = pyminc.volumeLikeFile(inputfilename, outputfilename)
outfile.writeFile()
outfile.closeVolume()
infile.closeVolume()

The error:
HDF5-DIAG: Error detected in HDF5 (1.8.4-patch1) thread 0:
  #000: ../../../src/H5T.c line 2120 in H5Tset_size(): size must be positive
    major: Invalid arguments to routine
    minor: Bad value
HDF5-DIAG: Error detected in HDF5 (1.8.4-patch1) thread 0:
  #000: ../../../src/H5T.c line 2120 in H5Tset_size(): size must be positive
    major: Invalid arguments to routine
    minor: Bad value
HDF5-DIAG: Error detected in HDF5 (1.8.4-patch1) thread 0:
  #000: ../../../src/H5T.c line 2120 in H5Tset_size(): size must be positive
    major: Invalid arguments to routine
    minor: Bad value

The error with PYMINCDEBUG set:

HDF5-DIAG: Error detected in HDF5 (1.8.4-patch1) thread 0:
  #000: ../../../src/H5T.c line 2120 in H5Tset_size(): size must be positive
    major: Invalid arguments to routine
    minor: Bad value
HDF5-DIAG: Error detected in HDF5 (1.8.4-patch1) thread 0:
  #000: ../../../src/H5T.c line 2120 in H5Tset_size(): size must be positive
    major: Invalid arguments to routine
    minor: Bad value
HDF5-DIAG: Error detected in HDF5 (1.8.4-patch1) thread 0:
  #000: ../../../src/H5T.c line 2120 in H5Tset_size(): size must be positive
    major: Invalid arguments to routine
    minor: Bad value
sizes [192, 256, 192]
separations [0.999999999999998, 1.0, 1.0]
starts [-103.827645851979, -111.44957556808501, -84.49910974372]
dimnames: ['zspace', 'yspace', 'xspace']
sizes [192, 256, 192]
separations [0.999999999999998, 1.0, 1.0]
starts [-103.827645851979, -111.44957556808501, -84.49910974372]
dimnames: ['zspace', 'yspace', 'xspace']
0 48381856 c_void_p(48388544) zspace
0 48384368 c_void_p(48388752) yspace
0 48384624 c_void_p(48388960) xspace
3 [48388544, 48388752, 48388960]
sizes [192, 256, 192]
setting data
New Shape: (192, 256, 192)
TYPE: short float64
TYPE: int float64
TYPE: double float64
before setting of hyperslab
after setting of hyperslab

Sample input file that gives the error:
http://www.bic.mni.mcgill.ca/users/mishkin/files/t1.minc2.posdir.mnc

I only get the error for my own acquired data, but using something
like the icbm_152 volume I don't get the error. I've looked for
anything funny about my sample input file but haven't spotted
anything. Perhaps someone who understands the HDF5 error a bit better
can help?

thanks,
mishkin
_______________________________________________
MINC-users at bic.mni.mcgill.ca
http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users


More information about the MINC-users mailing list