[Neuroimaging] Distance nipype

Lorenzo Pini pini.lorenzo2 at gmail.com
Fri Jan 28 10:12:06 EST 2022


Yes, It makes sense, sorry for my confusion.

Now I have "only" a memory issue with the data:
MemoryError: Unable to allocate 35.1 GiB for an array with shape (66897,
70517) and data type float64
Is it referring to the warning in metrics.py file?  # there is a bug in
some scipy ndimage methods that gets tripped by memory mapped objects
Do you know how I can solve this?

Best,
L


Il giorno ven 28 gen 2022 alle ore 15:57 Ariel Rokem <arokem at uw.edu> ha
scritto:

> Hi Lorenzo,
>
> Thanks for your email. Could you try the following?
>
> my_dist =
> Distance(self='/home/pnc/Desktop/PinNC_v5/test/T1w_control_005_2_brainFS.nii.gz',
>          volume1 = 'mydir/test/Image1.nii.gz',
>          volume2 = 'mydir/test/Image2.nii.gz',
>          method =  "eucl_max")
> res = my_dist.run()
>
> To explain: in the code you sent, the error arises because you are calling
> the `run` method on the class, and not an instance of the class. In the
> code I provided above, I first create an instance of the class `Distance`
> and then call the method from this instance.
>
> Hope that helps,
> Ariel
>
>
> On Fri, Jan 28, 2022 at 6:40 AM Lorenzo Pini <pini.lorenzo2 at gmail.com>
> wrote:
>
>> Hi all,
>>
>> I'm using Distance to compute some metrics between two images.
>> I saw the documentation and the scripts and I tried to run with the
>> following command:
>>
>> Distance(self='/home/pnc/Desktop/PinNC_v5/test/T1w_control_005_2_brainFS.nii.gz',
>>          volume1 = 'mydir/test/Image1.nii.gz',
>>          volume2 = 'mydir/test/Image2.nii.gz',
>>          method =  "eucl_max")
>> res = Distance.run()
>>
>> However, there is an error with the self function:
>> TypeError: run() missing 1 required positional argument: 'self'
>>
>> and when I inspect the input I have the following:
>>
>> mask_volume = <undefined>
>> method = eucl_min
>> volume1 = <undefined>
>> volume2 = <undefined>
>>
>> What's the problem here?
>> Thanks
>> L
>> _______________________________________________
>> Neuroimaging mailing list
>> Neuroimaging at python.org
>> https://mail.python.org/mailman/listinfo/neuroimaging
>>
> _______________________________________________
> Neuroimaging mailing list
> Neuroimaging at python.org
> https://mail.python.org/mailman/listinfo/neuroimaging
>


-- 
*Lorenzo Pini, PhD *
*Padova Neuroscience Center, PNC*
Università degli Studi di Padova
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/neuroimaging/attachments/20220128/0b92baf2/attachment.html>


More information about the Neuroimaging mailing list