[MINC-users] minccomplete's completeness

Robert D. Vincent robert.d.vincent at mcgill.ca
Fri Jun 17 17:04:44 EDT 2016


Hi all,

I am in the process of making the fix to the API. Should be checked in this
afternoon.

    -bert

On Fri, Jun 17, 2016 at 3:54 PM, Vladimir S. FONOV <vladimir.fonov at gmail.com
> wrote:

> 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
>


More information about the MINC-users mailing list