[MINC-development] MINC2 API for accessing metadata - broken ?

Leila Baghdadi baghdadi at phenogenomics.ca
Sat Dec 22 18:57:14 EST 2012


Hello,
I can not say anything about minc1 because I am not sure how things were meant to function.

but The reason "history" specifically is added this way (/minc-2.0/history instead of /minc-2.0/info/history) is because, it would be unreadable by tools like mincheader even-though you could see it if you ran "h5ls" on the file.

HTH

Leila

----- Original Message -----
From: Vladimir S. FONOV <vladimir.fonov at gmail.com>
Sent: Fri, 12/21/2012 5:57pm
To: "discussion & planning, MINC" <minc-development at bic.mni.mcgill.ca>
Subject: [MINC-development] MINC2 API for accessing metadata - broken ?

Hello Everybody,


I am trying to add metadata functionality to the new MINC2 ITK 
reader/writer ( http://review.source.kitware.com/#/c/9033/ )
Using MINC2 API functions ( milist_start , milist_grp_next , 
milist_attr_next )

First of all, there was a bug in grpattr.c ,function milist_grp_op , 
preventing function milist_grp_next actually returning group name.

My question is following - what is the official way of getting values of 
what was a global attributes in MINC1 world (i.e :ident, :minc_version ).

Since in MINC2 world the function miget_attr_values does following:
   if ( strcmp ( name, "history" ) ) {
     strncpy ( fullpath, MI_ROOT_PATH "/" MI_INFO_NAME, sizeof ( 
fullpath ) );
   } else {
     strncpy ( fullpath, MI_ROOT_PATH "/" , sizeof ( fullpath ) );
   }

so, ident and minc_version is not accessible. But also if somebody will 
happen to create an attribute history of some other dataset this whole 
procedure will cause MINC2 api to try to read it from 
/minc-2.0/<dataset> instead of /minc-2.0/info/<dataset>

-- 
Best regards,

  Vladimir S. FONOV ~ vladimir.fonov <at> gmail.com
_______________________________________________
MINC-development mailing list
MINC-development at bic.mni.mcgill.ca
http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-development


More information about the MINC-development mailing list