Skip to content

Issues with fixels.py #30

@danakanel

Description

@danakanel

After running the following command:

confixel --index-file FDC/index.mif --directions-file FDC/directions.mif --cohort-file cohort_FDC.csv --relative-root /Users/kanelds/confixel/data --output-hdf5 FDC.h5

I get the following errors:

  1.    File "/Users/kanelds/opt/anaconda3/lib/python3.9/site-packages/confixel/fixels.py", line 45, in mif_to_nifti2
         data = nifti2_img.get_data().squeeze()
       File "/Users/kanelds/opt/anaconda3/lib/python3.9/site-packages/nibabel/deprecator.py", line 185, in deprecated_func
         raise error_class(message)
     nibabel.deprecator.ExpiredDeprecationError: get_data() is deprecated in favor of get_fdata(), which has a more predictable return type. To obtain get_data() behavior going forward, use numpy.asanyarray(img.dataobj).   
    

I edited line 45: get_data() to get_fdata()

  1.  File "/Users/kanelds/opt/anaconda3/lib/python3.9/site-packages/confixel/fixels.py", line 100, in gather_fixels
       for _ in range(fixel_count):
     TypeError: 'numpy.float64' object cannot be interpreted as an integer
    

I edited line 99: range(fixel_count) to range(int(fixel_count))

:) Thank you again!!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions