[MINC-users] minccomplete's completeness

Matthijs van Eede matthijs.vaneede at sickkids.ca
Fri Jun 17 18:08:10 EDT 2016


That works! Thanks Vlad and Bert for this lightning fast turnaround!

Cheers,
Matthijs
________________________________________
From: minc-users-bounces at bic.mni.mcgill.ca [minc-users-bounces at bic.mni.mcgill.ca] on behalf of Robert D. Vincent [robert.d.vincent at mcgill.ca]
Sent: Friday, June 17, 2016 5:37 PM
To: MINC users mailing list
Subject: Re: [MINC-users] minccomplete's completeness

Hi all,

The develop branch now has a fix for the bug Matthijs just reported. The
official call to
miset_attr_values(volume, MI_STRING_TYPE, "image", "complete", 5, "true_")
should do the right thing now.

Please let me know immediately if it doesn't!

    -bert


On Fri, Jun 17, 2016 at 5:04 PM, Robert D. Vincent <
robert.d.vincent at mcgill.ca> wrote:

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