Closed atheyers closed 4 years ago
it seems to be confusing the name for rendered image. Try specify the full name for the -r
flag like defaced.png with full extension
Now I'm getting a new error:
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 188, in loop_through_units
self.display_unit()
File "c:\users\atheyers\appdata\local\programs\python\python36-32\lib\site-pac
kages\visualqc\defacing.py", line 448, in display_unit
self.show_mr_images()
File "c:\users\atheyers\appdata\local\programs\python\python36-32\lib\site-pac
kages\visualqc\defacing.py", line 491, in show_mr_images
self.orig_img]):
File "c:\users\atheyers\appdata\local\programs\python\python36-32\lib\site-pac
kages\mrivis\base.py", line 278, in get_slices_multi
'They must have the shape: {}'.format(self._image_shape))
ValueError: Supplied images are not compatible with this class. They must have t
he shape: [192 256 256]
this means the MRI and defaced images do not both have the same dimensions - did you ensure that?
Just doublechecked and yes, they both have the same orientation and dimensions.
Run mri_info on both images and show me the result here.. It may be that one has the 4th dim encoded differently for this comparison to fail internally
Okay, so for the original one it's:
Volume information for orig.nii.gz
type: nii
dimensions: 192 x 256 x 256
voxel sizes: 1.000000, 1.000000, 1.000000
type: FLOAT (3)
fov: 192.000
dof: 0
xstart: -96.0, xend: 96.0
ystart: -128.0, yend: 128.0
zstart: -128.0, zend: 128.0
TR: 0.00 msec, TE: 0.00 msec, TI: 0.00 msec, flip angle: 0.00 degrees
nframes: 1
PhEncDir: UNKNOWN
FieldStrength: 0.000000
ras xform present
xform info: x_r = -1.0000, y_r = -0.0000, z_r = -0.0000, c_r = 3.2910
: x_a = 0.0000, y_a = 1.0000, z_a = -0.0000, c_a = 28.1280
: x_s = -0.0000, y_s = 0.0000, z_s = 1.0000, c_s = -31.7899
Orientation : LAS
Primary Slice Direction: axial
voxel to ras transform:
-1.0000 -0.0000 -0.0000 99.2910
0.0000 1.0000 -0.0000 -99.8720
-0.0000 0.0000 1.0000 -159.7899
0.0000 0.0000 0.0000 1.0000
voxel-to-ras determinant -1
ras to voxel transform:
-1.0000 -0.0000 -0.0000 99.2910
-0.0000 1.0000 -0.0000 99.8720
-0.0000 -0.0000 1.0000 159.7899
-0.0000 -0.0000 -0.0000 1.0000
and for defaced:
Volume information for defaced.nii.gz
type: nii
dimensions: 192 x 256 x 256
voxel sizes: 1.000000, 1.000000, 1.000000
type: FLOAT (3)
fov: 192.000
dof: 0
xstart: -96.0, xend: 96.0
ystart: -128.0, yend: 128.0
zstart: -128.0, zend: 128.0
TR: 0.00 msec, TE: 0.00 msec, TI: 0.00 msec, flip angle: 0.00 degrees
nframes: 1
PhEncDir: UNKNOWN
FieldStrength: 0.000000
ras xform present
xform info: x_r = -1.0000, y_r = -0.0000, z_r = -0.0000, c_r = 3.2910
: x_a = 0.0000, y_a = 1.0000, z_a = -0.0000, c_a = 28.1280
: x_s = -0.0000, y_s = 0.0000, z_s = 1.0000, c_s = -31.7899
Orientation : LAS
Primary Slice Direction: axial
voxel to ras transform:
-1.0000 -0.0000 -0.0000 99.2910
0.0000 1.0000 -0.0000 -99.8720
-0.0000 0.0000 1.0000 -159.7899
0.0000 0.0000 0.0000 1.0000
voxel-to-ras determinant -1
ras to voxel transform:
-1.0000 -0.0000 -0.0000 99.2910
-0.0000 1.0000 -0.0000 99.8720
-0.0000 -0.0000 1.0000 159.7899
-0.0000 -0.0000 -0.0000 1.0000
try:
pip uninstall mrivis
pip install -U mrivis
and run the vqcdeface again?
I tried uninstalling and reinstalling mrivis, but I'm still getting the same errors when running vqcdeface.
show me the latest error, in full detail
This is the error:
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 188, in loop_through_units
self.display_unit()
File "c:\users\atheyers\appdata\local\programs\python\python36-32\lib\site-pac
kages\visualqc\defacing.py", line 448, in display_unit
self.show_mr_images()
File "c:\users\atheyers\appdata\local\programs\python\python36-32\lib\site-pac
kages\visualqc\defacing.py", line 491, in show_mr_images
self.orig_img]):
File "c:\users\atheyers\appdata\local\programs\python\python36-32\lib\site-pac
kages\mrivis\base.py", line 280, in get_slices_multi
''.format(img.shape, self._image_shape))
ValueError: Supplied images do match in size. This image has dimensions: (181, 2
34, 256) They must all have: [192 256 256]
It's saying there is a dimension mismatch, but both of the actual image files are 192 256 256.
Okay, so another update. It seems it does work for certain defacers and not for others (I'd only tried one defacer with the original test set, one of the ones that happen to work) But in the headers and images themselves, they all have the same dimensions.
that makes more sense - some defacers are messing the headers, or not maintaining them in sync with actual image data.
which ones were they?
I see - which "viewer" are you referring to? this tool?
Yeah, I meant vqcdeface
I've run into the same issue (ValueError: Supplied images do match in size.
), and was wondering if there's been a resolution to this? I'm using version 0.4.8 and the data was defaced using quickshear. Other than re-doing the defacing using a different software package, is there a work around for visualqc_defacing
? I double checked to ensure that the original and defaced images have the same dimensions
f55d2533a58117d7b6c07448e6b51d7210858afe fixes this
Re-installed and everything seems to work now, thanks!
Description
So I tried running some test data with vqcdeface using this command
and got this error:
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)