67枚あるtifファイルの256×256の画像を256×256×67の三次元行列にしたいです
Show older comments
67枚あるtifファイルの256×256の画像を256×256×67の三次元行列にしたいです 下記のプログラムで、tifファイル1枚1枚をグレースケールに変換したのですが、それらを一つの三次元行列にしたいのですが、cat関数が使えるかなと思って試したのですがfor分の中に上手く組み込むことができず困っています。 clear; clc; close all; % 初期化
fileFolder = fullfile(pwd,'Series1'); % 画像の読込み (67枚の断面画像)
tifFiles = dir(fullfile(fileFolder,'*.tif'));
numfiles = length(tifFiles); mydata = cell(1, numfiles);
for k = 1:numfiles
mydata{k} = imread(tifFiles(k).name);
gray{k} = mat2gray(mydata{k});
end
Accepted Answer
More Answers (0)
Categories
Find more on Transforms in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!