raamana / visualqc Goto Github PK
View Code? Open in Web Editor NEWVisualQC : assistive tool to ease the quality control workflow of neuroimaging data.
Home Page: https://raamana.github.io/visualqc/
License: Apache License 2.0
VisualQC : assistive tool to ease the quality control workflow of neuroimaging data.
Home Page: https://raamana.github.io/visualqc/
License: Apache License 2.0
fsleyes render --scene 3d -rot 45 0 -30 --outfile tmp.99.result.deface.fsleyes.render_1.png tmp.99.result.deface.nii -dr 30 250 -cr 30 500 -in spline -bf 0.225 -r 100 -ns 500
thanks to Arshitha and Eric from NIH
visualqc fails to start up as Pillow module does not exist
List Pillow image library as a dependency
Maybe I'm just missing it, but it seems challenging to use visualqc_t1_mri
with an arbitrary list of T1s.
For example, I wanted to look at some bet segmentations I just ran and thought I'd try visualqc
visualqc_t1_mri \
-i <(find -cmin -5000 | grep "anat\.nii" | cut -f 2 -d / | cut -f1 -d. | sed "s|_anat||") \
--user_dir .
This fails saying my subject directories are empty (seems to think I want to use freesurfer outputs) alternatively, keeping the full path files
visualqc_t1_mri \
-i <(find -cmin -5000 | grep "anat\.nii"") \
--user_dir .
similarly fails.
It would be nice to have a simple mode where you pass a list of T1 files.
for easier programmatic subject-wise access
Right now, too many variables are being passed as arguments to 3 key methods. It works for now, but this could be made more elegant by encapsulating all the relevant variables in a class, and passing a single class.
Need to ensure there is no data leakage (or stale graphics) between subjects!
Not everyone perceive red and green accurately, so make the mixing accessible, let users customize it to whatever Colors they like!
Often Freesurfer processing is done on a HPC or another remote system, which may not have a display attached to it. So we can't run visualqc directly. And copying the entire FS output is not only quite a hassle (huge size, slow transfer, not enough space locally etc), but also not necessary. So a simple bash script that can create an tar or zip of the just the files needed, would help making that processing by saving time and disk space.
it would be very useful to implement domain- or project- or user-specific rules for outlier alerts..
one example could be: hippocampal volume being close to 0mm^3 or 10000mm^3 is an indicator of a bad segmentation!
I just tried to run a normal visualqc_freesurfer
command, but without success as the output in the following section shows. This happened when I tried to use a new environment with recent python and visualqc versions
I don't have any problem in the same folder in a previous version that I had configured (python 3.5 and
visualqc 0.3.3.3).
(env-new) user@server$ visualqc_freesurfer --fs_dir .
/home/user/miniconda/envs/env-new/lib/python3.7/site-packages/visualqc/utils.py:610: UserWarning: The following subjects do NOT have all the required files or some are empty - skipping them!
'The following subjects do NOT have all the required files or some are empty - skipping them!')
1611420080917
The following files do not exist or empty:
/folder_server/1611420080917/mri/aparc+aseg.mgz
14 subjects are usable for review.
Input folder: .
Output folder: ./visualqc
Preprocessing data - please wait ..
(or contemplate the vastness of universe! )
Extracting feature type: cortical
Extracting feature type: subcortical
Traceback (most recent call last):
File "/home/user/miniconda/envs/env-new/lib/python3.7/site-packages/visualqc/workflows.py", line 346, in extract_features
self.feature_paths[feat_type] = self.feature_extractor(self, feat_type)
File "/home/user/miniconda/envs/env-new/lib/python3.7/site-packages/visualqc/readers.py", line 169, in gather_freesurfer_data
features = np.vstack([read_aseg_stats(qcw.fs_dir, id) for id in qcw.id_list])
File "/home/user/miniconda/envs/env-new/lib/python3.7/site-packages/visualqc/readers.py", line 169, in <listcomp>
features = np.vstack([read_aseg_stats(qcw.fs_dir, id) for id in qcw.id_list])
AttributeError: 'FreesurferRatingWorkflow' object has no attribute 'fs_dir'
Unable to extract subcortical features - skipping them.
Traceback (most recent call last):
File "/home/user/miniconda/envs/env-new/bin/visualqc_freesurfer", line 11, in <module>
sys.exit(main())
File "/home/user/miniconda/envs/env-new/lib/python3.7/site-packages/visualqc/__freesurfer__.py", line 11, in main
freesurfer.cli_run()
File "/home/user/miniconda/envs/env-new/lib/python3.7/site-packages/visualqc/freesurfer.py", line 1066, in cli_run
wf.run()
File "/home/user/miniconda/envs/env-new/lib/python3.7/site-packages/visualqc/workflows.py", line 68, in run
self.preprocess()
File "/home/user/miniconda/envs/env-new/lib/python3.7/site-packages/visualqc/freesurfer.py", line 318, in preprocess
self.detect_outliers()
File "/home/user/miniconda/envs/env-new/lib/python3.7/site-packages/visualqc/workflows.py", line 371, in detect_outliers
features = gather_data(self.feature_paths[feature_type], self.id_list)
File "/home/user/miniconda/envs/env-new/lib/python3.7/site-packages/visualqc/readers.py", line 225, in gather_data
features = np.vstack([np.genfromtxt(path_list[sid]) for sid in id_list])
File "/home/user/miniconda/envs/env-new/lib/python3.7/site-packages/visualqc/readers.py", line 225, in <listcomp>
features = np.vstack([np.genfromtxt(path_list[sid]) for sid in id_list])
IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices
Ideally I want to use this wonderful toolbox to generate the overview plots given in the interactive window but do the actual marking of these images externally.
Is there an option to generate individual plots without the interactive window (and preferably without the need for tkmedit) as I would like to run this as a batch job on our cluster and that wouldn't allow any graphical windows.
Running visualqc_func_mri
on test data from OpenNeuro
visualqc_func_mri -b test
ModuleNotFoundError: No module named 'bids'
I tried to run
visualqc_func_mri -b SmallData/
and got:
File "/home/me/miniconda3/lib/python3.7/site-packages/visualqc/functional_mri.py", line 344, in init_getters
from bids.layers import BIDSLayout
ModuleNotFoundError: No module named 'bids.grabbids'
I noticed that in the version 0.7.0
from Jan 2019 they changed this grabbids
submodule to layout
:
https://github.com/bids-standard/pybids/blob/master/CHANGELOG.md#version-070-january-10-2019
Unfortunately, the fix wasn't as easy as replacing import in 344 of functional_mri.py
:
from bids.layout import BIDSLayout
After doing that I got instead
File "/home/me/miniconda3/lib/python3.7/site-packages/bids/layout/layout.py", line 969, in get
raise ValueError(msg + "If you're sure you want to impose "
ValueError: 'extensions' is not a recognized entity. Did you mean ['extension']? If you're sure you want to impose this constraint, set invalid_filters='allow'.
Maybe temporary fix would be to specify pybids
version in requirements?
include the command that generated the visualization, along with full flags and their descriptions
On some MRI scans, some light colors such as blue etc are very difficult to resolve, making it difficult to judge the accuracy of the parcellation. An option, such as a keyboard shortcut c
, to change all colors in a given slice to a high-contrast-on-gray-image color (perhaps red?) would be useful.
It would be very useful to automatic record location (image coordinates) or ROI name (parcel annotation perhaps?) of erroneous areas as users identify them. They can note it in Notes field right now with hemi:roi_code; etc but it is additional work (even if simple/quick) and sometimes users may not know the name or hemispheres.
Implement keyboard shortcuts to bring these up as necessary,
I would like to only visualize segmentation images (volumetric) of aseg.mgz to be overlaid on the MRI.
Within the conda activated visualqc enviroment
There is no issue to run the command as visualqc_freesurfer -i listImageID.txt -f . -o .
Because I only want to visualize subcortical segmentations, so I add a flag as below
visualqc_freesurfer -i listImageID.txt -f . -o . -g aseg.mgz
But got error saying that "segmentation image for ADNI-xxx-T1w-001 does not contain requested label set!" .
The aseg.mgz is inside the same mri folder as the aparc+aseg.mgz.
Please help me on this issue. Looking forward to your reply. Thank you so much.
Xin
I installed VisualQC on my AWS EC2.
When I tried to test it in terminal by using command line: visualqc_freesurfer -h, got error saying Type Error: an integer is required (got type bytes)
/home/Xin/miniconda3/lib/python3.8/site-packages/sklearn/externals/joblib/externals/cloudpickle/cloudpickle.py:47: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
import imp
Traceback (most recent call last):
File "/home/Xin/miniconda3/bin/visualqc_freesurfer", line 33, in
sys.exit(load_entry_point('visualqc==0.5+1.g8e386c1', 'console_scripts', 'visualqc_freesurfer')())
File "/home/Xin/miniconda3/bin/visualqc_freesurfer", line 25, in importlib_load_entry_point
return next(matches).load()
File "/home/Xin/miniconda3/lib/python3.8/importlib/metadata.py", line 77, in load
module = import_module(match.group('module'))
File "/home/Xin/miniconda3/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 961, in _find_and_load_unlocked
File "", line 219, in _call_with_frames_removed
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "", line 783, in exec_module
File "", line 219, in _call_with_frames_removed
File "/home/Xin/miniconda3/lib/python3.8/site-packages/visualqc/init.py", line 16, in
from visualqc.outliers import outlier_advisory
File "/home/Xin/miniconda3/lib/python3.8/site-packages/visualqc/outliers.py", line 14, in
from sklearn.ensemble import IsolationForest
File "/home/Xin/miniconda3/lib/python3.8/site-packages/sklearn/init.py", line 64, in
from .base import clone
File "/home/Xin/miniconda3/lib/python3.8/site-packages/sklearn/base.py", line 13, in
from .utils.fixes import signature
File "/home/Xin/miniconda3/lib/python3.8/site-packages/sklearn/utils/init.py", line 13, in
from .validation import (as_float_array,
File "/home/Xin/miniconda3/lib/python3.8/site-packages/sklearn/utils/validation.py", line 27, in
from ..utils._joblib import Memory
File "/home/Xin/miniconda3/lib/python3.8/site-packages/sklearn/utils/_joblib.py", line 18, in
from ..externals.joblib import all # noqa
File "/home/Xin/miniconda3/lib/python3.8/site-packages/sklearn/externals/joblib/init.py", line 119, in
from .parallel import Parallel
File "/home/Xin/miniconda3/lib/python3.8/site-packages/sklearn/externals/joblib/parallel.py", line 32, in
from .externals.cloudpickle import dumps, loads
File "/home/Xin/miniconda3/lib/python3.8/site-packages/sklearn/externals/joblib/externals/cloudpickle/init.py", line 3, in
from .cloudpickle import *
File "/home/Xin/miniconda3/lib/python3.8/site-packages/sklearn/externals/joblib/externals/cloudpickle/cloudpickle.py", line 151, in
_cell_set_template_code = _make_cell_set_template_code()
File "/home/Xin/miniconda3/lib/python3.8/site-packages/sklearn/externals/joblib/externals/cloudpickle/cloudpickle.py", line 132, in _make_cell_set_template_code
return types.CodeType(
TypeError: an integer is required (got type bytes)
Describe what you were trying to get done.
Tell us what happened, what went wrong, and what you expected to happen.
Run through visualqc_t1_mri
Paste the command(s) you ran and the output.
If there was a crash, please include the traceback here.
visualqc_t1_mri -u . -i subjects -m t1.nii.gz
12 subjects are usable for review.
Input folder: .
Output folder: ./visualqc
Preprocessing data - please wait ..
(or contemplate the vastness of universe! )
Extracting feature type: histogram_whole_scan
200107_09_04319814 : 1/12
200107_15_51129205 : 2/12
200108_00_72128082 : 3/12
200108_01_82273425 : 4/12
200108_01_83887227 : 5/12
200108_06_06131380 : 6/12
200114_04_66523086 : 7/12
200114_04_91957295 : 8/12
200114_07_18910654 : 9/12
200115_00_27419385 : 10/12
200115_02_77379437 : 11/12
200115_05_12357443 : 12/12
Traceback (most recent call last):
File "/home/shengwei/anaconda3/bin/visualqc_t1_mri", line 8, in
sys.exit(main())
File "/home/shengwei/anaconda3/lib/python3.7/site-packages/visualqc/t1_mri.py", line 11, in main
t1_mri.cli_run()
File "/home/shengwei/anaconda3/lib/python3.7/site-packages/visualqc/t1_mri.py", line 777, in cli_run
wf.run()
File "/home/shengwei/anaconda3/lib/python3.7/site-packages/visualqc/workflows.py", line 75, in run
self.preprocess()
File "/home/shengwei/anaconda3/lib/python3.7/site-packages/visualqc/t1_mri.py", line 314, in preprocess
self.detect_outliers()
File "/home/shengwei/anaconda3/lib/python3.7/site-packages/visualqc/workflows.py", line 387, in detect_outliers
features = gather_data(self.feature_paths[feature_type], self.id_list)
File "/home/shengwei/anaconda3/lib/python3.7/site-packages/visualqc/readers.py", line 225, in gather_data
features = np.vstack([np.genfromtxt(path_list[sid]) for sid in id_list])
File "/home/shengwei/anaconda3/lib/python3.7/site-packages/visualqc/readers.py", line 225, in
features = np.vstack([np.genfromtxt(path_list[sid]) for sid in id_list])
KeyError: '200107_09_04319814'
Colour mapping not generated with 3D surface images but no error or warning given from tksurfer.
Independent Cropping of orig and defaced causing them to mismatch in size.. sync cropping
Line 406 in 47bdb3b
Package version mismatch with mrivis
causes failure to load mrivis.base
.
Installed visualqc using setup.py and attempt to run visualqc_t1_mri
./visualqc_t1_mri
/axiom2/projects/software/arch/linux-xenial-xerus/python-modules/20180122/lib/python3.6/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
from ._conv import register_converters as _register_converters
Traceback (most recent call last):
File "./visualqc_t1_mri", line 11, in <module>
load_entry_point('visualqc==0.3+68.gb01c5de.dirty', 'console_scripts', 'visualqc_t1_mri')()
File "/axiom2/projects/software/arch/linux-xenial-xerus/python-setuptools/20180327/lib/python3.6/site-packages/setuptools-39.0.1-py3.6.egg/pkg_resources/__init__.py", line 480, in load_entry_point
File "/axiom2/projects/software/arch/linux-xenial-xerus/python-setuptools/20180327/lib/python3.6/site-packages/setuptools-39.0.1-py3.6.egg/pkg_resources/__init__.py", line 2693, in load_entry_point
File "/axiom2/projects/software/arch/linux-xenial-xerus/python-setuptools/20180327/lib/python3.6/site-packages/setuptools-39.0.1-py3.6.egg/pkg_resources/__init__.py", line 2324, in load
File "/axiom2/projects/software/arch/linux-xenial-xerus/python-setuptools/20180327/lib/python3.6/site-packages/setuptools-39.0.1-py3.6.egg/pkg_resources/__init__.py", line 2330, in resolve
File "/axiom2/projects/software/arch/linux-xenial-xerus/visualqc/0.3/lib/python3.6/site-packages/visualqc-0.3+68.gb01c5de.dirty-py3.6.egg/visualqc/__t1_mri__.py", line 4, in <module>
from visualqc import t1_mri
File "/axiom2/projects/software/arch/linux-xenial-xerus/visualqc/0.3/lib/python3.6/site-packages/visualqc-0.3+68.gb01c5de.dirty-py3.6.egg/visualqc/t1_mri.py", line 17, in <module>
from mrivis.base import Collage
ModuleNotFoundError: No module named 'mrivis.base'
Checking mrivis location:
In [1]: import mrivis
/axiom2/projects/software/arch/linux-xenial-xerus/python-modules/20180122/lib/python3.6/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
from ._conv import register_converters as _register_converters
In [2]: mrivis.__file__
Out[2]: '/axiom2/projects/software/arch/linux-xenial-xerus/src/visualqc/.eggs/mrivis-0.2.8-py3.6.egg/mrivis/__init__.py'
So it's picking up the version that got installed by visualqc, mrivis-0.2.8
Fixed by installing mrivis
from github, so it looks like you just need to bump the pypi version to be compatible with visualqc
HEAD
or
a keyboard shortcut to zoom in all the surface visualizations into 2 rows of 3 large panels
an option to specify a βnegativeβ mask (lesion, pathology, bad FOV etc) would be useful. VisualQC can use such a mask to highlight erroneous areas and parcels during the review, to further expedite the process.
Provide option to hide subject ID from display, so ratings are not biased based on site, diagnostic group or repeat scans for the same subject.
the .add_alerts()
and .update_alerts()
methods of various workflows are exact duplicates! they can absorbed into the visualqc.base.BaseWorkflow
class without any loss of functionality and avoid duplicated code. However, this requires proper testing on datasets where outlier detection module identifies some outliers etc.
This is related to #31, where I'm getting the following error:
ValueError: Supplied images do match in size. This image has dimensions: (208, 106, 128) They must all have: [208 120 128]
I used nibabel to ensure that the original and defaced images contain the same shape & dimensions, so I'm unsure how to work around this issue.
Describe what you were trying to get done.
Tell us what happened, what went wrong, and what you expected to happen.
visualqc_defacing --user_dir /N/slate/dlevitas/dan_test/sub-OpenSciJan22/anat/defaced_test --defaced_name defaced.nii.gz --mri_name orig.nii.gz --render_name rendered.png -o $PWD/visualqc --id_list /N/slate/dlevitas/dan_test/sub-OpenSciJan22/anat/defaced_test/subject_ids.txt
visualqc version:
visualqc-0.4.1-py3-none-any
Python version:
Python 3.6.9
Operating System:
Ubuntu 18
When I try to launch visualqc_freesurfer I ran into the following error message.
hayashis@haswell:~/Downloads 1 visualqc_freesurfer --fs_dir fsdir
/home/hayashis/.local/lib/python3.6/site-packages/visualqc/utils.py:615: UserWarning: The following subjects do NOT have all the required files or some are empty - skipping them!
'The following subjects do NOT have all the required files or some are empty - skipping them!')
visualqc
The following files do not exist or empty:
/home/hayashis/Downloads/fsdir/visualqc/mri/orig.mgz
/home/hayashis/Downloads/fsdir/visualqc/mri/aparc+aseg.mgz
1 subjects are usable for review.
Traceback (most recent call last):
File "/home/hayashis/.local/bin/visualqc_freesurfer", line 11, in <module>
sys.exit(main())
File "/home/hayashis/.local/lib/python3.6/site-packages/visualqc/__freesurfer__.py", line 11, in main
freesurfer.cli_run()
File "/home/hayashis/.local/lib/python3.6/site-packages/visualqc/freesurfer.py", line 1070, in cli_run
wf = make_workflow_from_user_options()
File "/home/hayashis/.local/lib/python3.6/site-packages/visualqc/freesurfer.py", line 1042, in make_workflow_from_user_options
id_list, vis_type, source_of_features)
File "/home/hayashis/.local/lib/python3.6/site-packages/visualqc/utils.py", line 783, in check_outlier_params
raise ValueError('Invalid fraction of outliers: '
ValueError: Invalid fraction of outliers: must be more than 1/n (to enable detection of atleast 1)
visualqc_freesurfer --fs_dir fsdir
I'm not sure whether this is something lacking on your documentation or I just didn't pay enough attention.
So, I processed "my" brains with the following command:
visualqc_freesurfer --fs_dir People/
So far so good, but now I want to have a look again to those where I selected too tired or review later or simply some in particular again. The problem here is that I don't understand how to do this.
If I run the same command obviously it says no subjects to review. I tried this:
visualqc_freesurfer --fs_dir Peopl/ --id_list ids.txt
Where ids.txt
has the IDs I want, but I just receive a
ValueError: Invalid fraction of outliers: must be more than 1/n (to enable detection of atleast 1)
What am I doing wrong here? I think at least for those brains where I selected I'm tired or review later it should exist some automatic way.
Hello Raamana,
Currently trying to use the visualQC output for surfaces visualizations. They work for aparc+aseg/
I have freesurfer installed and sourced to terminal, however, this message keeps popping up:
Attempting to generate the surface visualizations of parcellation ...
Freesurfer does not seem to be installed - skipping surface visualizations.
Not sure if this is an issue with running it in terminal or if there's a separate installation procedure needed for visualqc.
to let user customize it for their dataset
when reviewing a large dataset, it maybe useful under some circumstances, to allow the user to focus on "outlier" candidates only, reducing the size by 90% or so, depending on the outlier fraction they chose.
the key here is to ensure outlier identification method is well validated and useful for the task at hand.
/Users/lab/opt/anaconda3/lib/python3.9/site-packages/visualqc/freesurfer.py:395: MatplotlibDeprecationWarning:
The set_window_title function was deprecated in Matplotlib 3.4 and will be removed two minor releases later. Use manager.set_window_title or GUI-specific methods instead.
Sometimes typing in the Notes section triggers the shortcut keys in the rest of the visualqc (e.g. typing g switches to the rating 'good', typing t turns on/off the aseg layer)
just because one ROI was erroneous (in few vertices or more) in a particular subject's parcellation doesn;t mean we need to discard the entire parcellation.. Hence, after a dataset or subset of it QCed, we could analyze the ratings giles and summarize which ROIs within the dataset are deemed to be accurate for further analyses upon manual/visual inspection!
some facial features may still be visible after defacing such as eyes and ears, it would be help capture additional info
/Users/lab/opt/anaconda3/lib/python3.9/site-packages/visualqc/interfaces.py:39: MatplotlibDeprecationWarning:
The keymap.all_axes rcparam was deprecated in Matplotlib 3.3 and will be removed two minor releases later.
plt.rcParams[key] = ''
Hi @raamana,
I was testing the outlier detection module in VisualQC (latest version) and I see the same error as above. Please can assist in how to resolve this error:
$ visualqc_freesurfer --fs_dir '/mnt/fsx/Screening_3DT1w_FSResults' -i '/home/ubuntu/Desktop/visualqc_sub_list.txt' -olt subcortical
visualqc version 0.5.1+25.g1d9d10c for Freesurfer QC
Time stamp : 2022-03-02 20:18:52
10 subjects are usable for review.
Input folder: /mnt/fsx/fsx/nbg/e2609/g000_301_Screening_3DT1w_Recommend_FSResults_NEW
Output folder: /mnt/fsx/fsx/nbg/e2609/g000_301_Screening_3DT1w_Recommend_FSResults_NEW/visualqc
Preprocessing data - please wait ..
(or contemplate the vastness of universe! )
Extracting feature type: subcortical
Traceback (most recent call last):
File "/home/ubuntu/anaconda3/lib/python3.8/site-packages/visualqc-0.5.1+25.g1d9d10c-py3.8.egg/visualqc/workflows.py", line 368, in extract_features
self.feature_paths[feat_type] = self.feature_extractor(self, feat_type)
File "/home/ubuntu/anaconda3/lib/python3.8/site-packages/visualqc-0.5.1+25.g1d9d10c-py3.8.egg/visualqc/readers.py", line 176, in gather_freesurfer_data
features = np.vstack([read_aseg_stats(qcw.fs_dir, id) for id in qcw.id_list])
File "/home/ubuntu/anaconda3/lib/python3.8/site-packages/visualqc-0.5.1+25.g1d9d10c-py3.8.egg/visualqc/readers.py", line 176, in
features = np.vstack([read_aseg_stats(qcw.fs_dir, id) for id in qcw.id_list])
AttributeError: 'FreesurferRatingWorkflow' object has no attribute 'fs_dir'
Unable to extract subcortical features! skipping..
Features required for outlier detection are not available - skipping it.
Attempting to generate the surface visualizations of parcellation ...
Thank you,
Leema
Originally posted by @Leema-Krishna-Murali in #23 (comment)
So I tried running some test data with vqcdeface using this command
vqcdeface -u C:\Users\atheyers\Documents\defacertest -d defaced.nii.gz -m orig.nii.gz -r defaced
and got this error:
Traceback (most recent call last):
File "c:\users\atheyers\appdata\local\programs\python\python36-32\lib\site-pac
kages\visualqc\defacing.py", line 399, in load_unit
self.render_img_list.append(imread(rimg_path))
File "C:\Users\atheyers\AppData\Roaming\Python\Python36\site-packages\matplotl
ib\image.py", line 1410, in imread
with Image.open(fname) as image:
File "c:\users\atheyers\appdata\local\programs\python\python36-32\lib\site-pac
kages\PIL\Image.py", line 2818, in open
raise IOError("cannot identify image file %r" % (filename if filename else f
p))
OSError: cannot identify image file 'C:\\Users\\atheyers\\Documents\\defacertest
\\test_001\\defaced.nii.gz'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\users\atheyers\appdata\local\programs\python\python36-32\lib\runpy.py
", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\users\atheyers\appdata\local\programs\python\python36-32\lib\runpy.py
", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\atheyers\AppData\Local\Programs\Python\Python36-32\Scripts\vqcd
eface.exe\__main__.py", line 9, in <module>
File "c:\users\atheyers\appdata\local\programs\python\python36-32\lib\site-pac
kages\visualqc\__defacing__.py", line 17, in main
defacing.cli_run()
File "c:\users\atheyers\appdata\local\programs\python\python36-32\lib\site-pac
kages\visualqc\defacing.py", line 650, in cli_run
wf.run()
File "c:\users\atheyers\appdata\local\programs\python\python36-32\lib\site-pac
kages\visualqc\workflows.py", line 78, in run
self.loop_through_units()
File "c:\users\atheyers\appdata\local\programs\python\python36-32\lib\site-pac
kages\visualqc\workflows.py", line 182, in loop_through_units
skip_subject = self.load_unit(unit_id)
File "c:\users\atheyers\appdata\local\programs\python\python36-32\lib\site-pac
kages\visualqc\defacing.py", line 402, in load_unit
''.format(rimg_path))
OSError: Unable to read the 3D rendered image @
C:\Users\atheyers\Documents\defacertest\test_001\defaced.nii.gz
This was working before with a different dataset and I've tried re-running that set and it still works perfectly fine. I tried it on a third dataset and that one failed too. As far as I can tell, there is no difference between the file types that I'm using in the three sets (in fact, the working set is a subset of the third one that failed)
Describe what you were trying to get done.
Tell us what happened, what went wrong, and what you expected to happen.
Paste the command(s) you ran and the output.
If there was a crash, please include the traceback here.
Right now, the figure is close and whole UI is recreated from scratch!.
This is entirely unnecessary, so long as you clear the data/viz subplots, and reset/unselect ratings for the next subject.
This will be faster and smoother.
VisualQC loads but I get this warning message every time:
Extracting feature type: cortical
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/visualqc/workflows.py", line 345, in extract_features
self.feature_paths[feat_type] = self.feature_extractor(self, feat_type)
File "/usr/local/lib/python3.5/dist-packages/visualqc/readers.py", line 166, in gather_freesurfer_data
[read_aparc_stats_wholebrain(qcw.in_dir, id) for id in qcw.id_list])
File "/usr/local/lib/python3.5/dist-packages/visualqc/readers.py", line 166, in
[read_aparc_stats_wholebrain(qcw.in_dir, id) for id in qcw.id_list])
File "/usr/local/lib/python3.5/dist-packages/visualqc/readers.py", line 75, in read_aparc_stats_wholebrain
hm_data = read_aparc_stats_in_hemi(stats_path, subset)
File "/usr/local/lib/python3.5/dist-packages/visualqc/readers.py", line 121, in read_aparc_stats_in_hemi
roi_stats_values[idx, :] = [stat[feat] for feat in subset]
TypeError: 'NoneType' object is not iterable
Unable to extract cortical features - skipping them.
Extracting feature type: subcortical
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/visualqc/workflows.py", line 345, in extract_features
self.feature_paths[feat_type] = self.feature_extractor(self, feat_type)
File "/usr/local/lib/python3.5/dist-packages/visualqc/readers.py", line 168, in gather_freesurfer_data
features = np.vstack([read_aseg_stats(qcw.fs_dir, id) for id in qcw.id_list])
File "/usr/local/lib/python3.5/dist-packages/visualqc/readers.py", line 168, in
features = np.vstack([read_aseg_stats(qcw.fs_dir, id) for id in qcw.id_list])
AttributeError: 'FreesurferRatingWorkflow' object has no attribute 'fs_dir'
Unable to extract subcortical features - skipping them.
Features required for outlier detection are not available - skipping it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.