how to read imageDatastore for 4D-single.
2 次查看(过去 30 天)
显示 更早的评论
Dear all,
My data is 4D-single. Anyone know how to read imageDatastore for 4D-single.
the code volds is for mage data set 3D MxNxN
clc
clear all
close all
%testDataimages
DATASetDir = fullfile('C:\Users\USER\Downloads\BrainTS\preprocessedDataset');
IMAGEDir = fullfile(DATASetDir,'imagesTr');
volReader = @(x) matRead(x);
volds = imageDatastore(IMAGEDir, ...
'FileExtensions','.mat','ReadFcn',volReader); %THIS ONE IS DATA FOR MXNXN
% labelReader = @(x) matread(x);
matFileDir = fullfile('C:\Users\USER\Downloads\BrainTS\preprocessedDataset\labelsTr');
classNames = ["background", "tumor"];
pixelLabelID = [0 1];
% pxds = (LabelDirr,classNames,pixelLabelID, ...
% 'FileExtensions','.mat','ReadFcn',labelReader);
pxds = pixelLabelDatastore(matFileDir,classNames,pixelLabelID, ...
'FileExtensions','.mat','ReadFcn',@matRead);
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Acquisition Support Packages for Hardware Adaptors (Generic Video Interface) 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!