Skip to content

negative dimensions are not allowed #2

@ghost

Description

I am trying to implement DeepMRAC for T1 and UTE worked fine. For Dixon for the same patient I am getting the following error:

Found files in /home/xxxxxx/Desktop/Claes/data/Dixon/Umap
Traceback (most recent call last):
File "process_DeepDixon_dicom.py", line 253, in
convert_data()
File "process_DeepDixon_dicom.py", line 71, in convert_data
assert len(os.listdir('%s/%s' % (tmpdir, datasets[2]))) == 132
IndexError: list index out of range

I changed the 132 to 128 in line 71 of the process_DeepDixon_dicom.py script:
assert len(os.listdir('%s/%s' % (tmpdir, datasets[2]))) == 132
since my Umap had 128 images and i have getting an error:

After this change i got the following error:

Traceback (most recent call last):
File "process_DeepDixon_dicom.py", line 263, in
DeepX = predict_DeepDixon(in_phase_rsl, opp_phase_rsl, args.version)
File "/home/xxxxxx/Desktop/Claes/opt/caai/rhscripts/DeepMRAC.py", line 130, in predict_DeepDixon
patches = get_patches_znorm(inphase,outphase,normalize_both=True)
File "/home/xxxxxx/Desktop/Claes/opt/caai/rhscripts/DeepMRAC.py", line 50, in get_patches_znorm
patches_vol1 = cutup(vol1,(16,192,192),(2,1,1))
File "/home/xxxxxx/Desktop/Claes/opt/caai/rhscripts/DeepMRAC.py", line 22, in cutup
data6 = stride_tricks.as_strided(data, strides=strides, shape=dims)
File "/home/xxxxxx/Desktop/Claes/deepmrac/lib/python3.8/site-packages/numpy/lib/stride_tricks.py", line 101, in as_strided
array = np.asarray(DummyArray(interface, base=x))
File "/home/xxxxxx/Desktop/Claes/deepmrac/lib/python3.8/site-packages/numpy/core/_asarray.py", line 83, in asarray
return array(a, dtype, copy=False, order=order)
ValueError: negative dimensions are not allowed

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