[MINC-users] minccomplete's completeness

Matthijs van Eede matthijs.vaneede at sickkids.ca
Fri Jun 17 17:00:00 EDT 2016


So.... what should I do at the moment then? Should I leave this solution (using the private internal miset_attribute function) in pyminc currently to ensure the image:complete flag can be set? And change things when the API has been fixed?

________________________________________
From: minc-users-bounces at bic.mni.mcgill.ca [minc-users-bounces at bic.mni.mcgill.ca] on behalf of Vladimir S. FONOV [vladimir.fonov at gmail.com]
Sent: Friday, June 17, 2016 3:54 PM
To: minc-users at bic.mni.mcgill.ca
Subject: Re: [MINC-users] minccomplete's completeness

That is going to be one more of the "special features" of minc2 format.

Technically, the attribute location should be /minc-2.0/image/<n>/image

where <n> is the currently selected resolution level (MINC2 supports
storing images at multiple resolution).

 From the point of view of minccomplete it uses image:complete attribute
in minc2 file only, which was automagically mapped to that name by MINC1
API .

For the actual API call,
miset_attr_values is not going to work, because currently it can't find
the location of this attribute.
To make it work, one could modify these lines:
https://github.com/BIC-MNI/libminc/blob/develop/libsrc2/grpattr.c#L918
https://github.com/BIC-MNI/libminc/blob/develop/libsrc2/grpattr.c#L502
https://github.com/BIC-MNI/libminc/blob/develop/libsrc2/grpattr.c#L600

and
https://github.com/BIC-MNI/libminc/blob/develop/libsrc2/grpattr.c#L783

and add one more special case on where to look for this attribute.

miset_attribute - is supposed to be a private internal function , not
visible to the API users.


On 16-06-17 02:57 PM, Matthijs van Eede wrote:
> Hi All,
>
> We have a fix for pyminc, which will soon be in the master branch, but also a question about how you should set the image:complete flag in a MINC file. The first thing we tried was:
>
> miset_attr_values(self.volPointer, MI_TYPE_STRING, "image", "complete", len("true_"), "true_")
>
> which creates a new entry in the MINC file header like this:
>
> int image ;
>      image:vartype = "group________" ;
>      image:complete = "true_" ;
>      image:signtype = "signed__" ;
>
> But this is not the entry that minccomplete is after. Then we used the following which does work, but which seems a bit sketchy:
>
> miset_attribute(self.volPointer, "/minc-2.0/image/0/image", "complete", MI_TYPE_STRING, len("true_"), "true_")
>
> Does anyone know why you can't set the image:complete attribute using the first method?
>


--
Best regards,

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

________________________________

This e-mail may contain confidential, personal and/or health information(information which may be subject to legal restrictions on use, retention and/or disclosure) for the sole use of the intended recipient. Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. If you have received this e-mail in error, please contact the sender and delete all copies.


More information about the MINC-users mailing list