ccipd / MRQy

RadQy is a quality assurance and checking tool for quantitative assessment of magnetic resonance imaging (MRI) and computed tomography (CT) data.
https://ccipd.github.io/MRQy/
BSD 3-Clause Clear License
93 stars 28 forks source link

Error running QC.py on brain scan. #8

Closed nathanhillyer closed 3 years ago

nathanhillyer commented 3 years ago

Summary

Getting a value error when running QC.py on a sample brain scan.

Output

(MRQy-irixV0Tq) lodge@DESKTOP-TBEVFI2:~/code/MRQy$ python src/mrqy/QC.py ~/code/MRQy/output ~/code/MRQy/input
MRQy is starting....
The number of patients is 1
The number of 22 images are saved to /home/lodge/code/MRQy/UserInterface/Data//home/lodge/code/MRQy/output/Output_3D_File
1-1. The VRX of the patient with the name of <Output_3D_File> is 0.47
1-2. The VRY of the patient with the name of <Output_3D_File> is 0.47
1-3. The VRZ of the patient with the name of <Output_3D_File> is 5.00
1-4. The ROWS of the patient with the name of <Output_3D_File> is 512
1-5. The COLS of the patient with the name of <Output_3D_File> is 512
1-6. The NUM of the patient with the name of <Output_3D_File> is 22
1-7. The MEAN of the patient with the name of <Output_3D_File> is 264.68047264391714
1-8. The RNG of the patient with the name of <Output_3D_File> is 1217.0
1-9. The VAR of the patient with the name of <Output_3D_File> is 26972.86366286672
1-10. The CV of the patient with the name of <Output_3D_File> is 60.56001727509839
1-11. The CPP of the patient with the name of <Output_3D_File> is 0.0
1-12. The PSNR of the patient with the name of <Output_3D_File> is 16.035276287657798
1-13. The SNR1 of the patient with the name of <Output_3D_File> is 21.97046333358044
1-14. The SNR2 of the patient with the name of <Output_3D_File> is 115.58171760174017
1-15. The SNR3 of the patient with the name of <Output_3D_File> is 4.875157085735123
1-16. The SNR4 of the patient with the name of <Output_3D_File> is 16.6181236994002
1-17. The CNR of the patient with the name of <Output_3D_File> is 15.726563711378503
1-18. The CVP of the patient with the name of <Output_3D_File> is 0.2720244069104087
1-19. The CJV of the patient with the name of <Output_3D_File> is 0.6383621489661986
1-20. The EFC of the patient with the name of <Output_3D_File> is 2.1080743214048123
1-21. The FBER of the patient with the name of <Output_3D_File> is 0.0
The results are updated.
Traceback (most recent call last):
  File "src/mrqy/QC.py", line 369, in <module>
    df = cleanup(address, 30)
  File "src/mrqy/QC.py", line 228, in cleanup
    tsne_umap(df, per)
  File "src/mrqy/QC.py", line 217, in tsne_umap
    tsne_obj = tsne.fit_transform(ds)
  File "/home/lodge/.local/share/virtualenvs/MRQy-irixV0Tq/lib/python3.8/site-packages/sklearn/manifold/_t_sne.py", line 932, in fit_transform
    embedding = self._fit(X)
  File "/home/lodge/.local/share/virtualenvs/MRQy-irixV0Tq/lib/python3.8/site-packages/sklearn/manifold/_t_sne.py", line 702, in _fit
    X = self._validate_data(X, accept_sparse=['csr'],
  File "/home/lodge/.local/share/virtualenvs/MRQy-irixV0Tq/lib/python3.8/site-packages/sklearn/base.py", line 421, in _validate_data
    X = check_array(X, **check_params)
  File "/home/lodge/.local/share/virtualenvs/MRQy-irixV0Tq/lib/python3.8/site-packages/sklearn/utils/validation.py", line 63, in inner_f
    return f(*args, **kwargs)
  File "/home/lodge/.local/share/virtualenvs/MRQy-irixV0Tq/lib/python3.8/site-packages/sklearn/utils/validation.py", line 726, in check_array
    raise ValueError("Found array with %d sample(s) (shape=%s) while a"
ValueError: Found array with 1 sample(s) (shape=(1, 21)) while a minimum of 2 is required.

Sample Data

This is the image upon which it fails: Output_3D_File.nii.gz

Amir-Reza-Sadri commented 3 years ago

As explained here, in order to UMAP and t-SNE work, we need to have at least 6 inputs.

satishev commented 3 years ago

Should be addressed as part of this commit.