Error in running 3-D Brain Tumor Segmentation Using Deep Learning

조회 수: 13 (최근 30일)
Jennifer Voon
Jennifer Voon 2019년 9월 27일
댓글: David Vaughan 2021년 1월 20일
I encounted an error while running the 3-D Brain Tumor Segmentation Using Deep Learning example.
It gives the following error
Error using matlab.io.datastore.ImageDatastore/read (line 77)
Error using ReadFcn @(x)(niftiread(x)>0) function handle for file
C:\Users\Jenni\AppData\Local\Temp\BraTS\Task01_BrainTumor\labelsTr\._BRATS_166.nii.gz.
Error using images.internal.nifti.niftiFile/getUncompressedFileName (line 130)
Cannot unzip file. tempdir needs write permissions and sufficient free space.
Error in images.internal.nifti.niftiFile (line 45)
[filename, self.TempfileCleaners, ~] =
self.getUncompressedFileName(firstFile);
Error in niftiread (line 66)
NF = images.internal.nifti.niftiFile(varargin{:});
Error in preprocessBraTSdataset>@(x)(niftiread(x)>0) (line 31)
labelReader = @(x) (niftiread(x) > 0);
Error in matlab.io.datastore.PixelLabelDatastore/readNumeric (line 854)
[L,info] = read(this.ImageDatastore);
Error in preprocessBraTSdataset (line 46)
outL = readNumeric(pxds);
Anyone knows how to fix this error? The code can be obtained here.
Thank you
  댓글 수: 1
David Vaughan
David Vaughan 2021년 1월 20일
This error from niftiRead occurs when there is no java machine running.
You can check this using : usejava('jvm').
The displayed error message that tmpdir needs write permissions etc is misleading.
The error occurs when trying to niftiRead() a .nii.gz file, which calls gunzip(), which calls checkFilesDirinputs(). This last function throws an error if there is no active java machine, but (for me) the message that java is required for this function is never displayed - perhaps because of the multiple try/catch layers at that point.
For me, the fix was to lauch matlab as 'matlab -nodesktop' rather than 'matlab -nojvm -nodesktop'

댓글을 달려면 로그인하십시오.

답변 (1개)

Shashank Gupta
Shashank Gupta 2019년 9월 30일
Hi Jennifer,
Cannot unzip file. tempdir needs write permissions and sufficient free space
this stack of error suggest that “niftiread()” is not able to unzip “.nii.gz” file either because of the folder does not have a read/write permission or there is no sufficient space for the function to unzip the file in the CPU/GPU memory.
You can cross check this error by reading one or two “.nii” volumes through “ImageDatastore” function. If the error persists then check your administrator permission for the folder.
I hope this helps.

카테고리

Help CenterFile Exchange에서 Image Data Workflows에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by