How to Open files dicom using my images data set, I have own function readimage

2 ビュー (過去 30 日間)
Dear all,
I have the data set images (can download thru thin link: https://drive.google.com/drive/folders/1kWV87hIzHJMWKKLTX3IH9cApuh7qa6oA?usp=sharing),
I want to read my data set images using my created function readimages (attached)
but, it still ask for select the images.
Any one can help me?
  1 件のコメント
dpb
dpb 2023 年 6 月 24 日
m=readlines('readimages.m');
m(1:10)
ans = 10×1 string array
"function out = readImages(varargin)" "" "% this function reads medical imaging data from an image file or folder" "% important information is stored in a convenient structure for MATLAB" "% this structure is used as the input for many other functions" "%" "% function can be called with no input argumets, will prompt for file selection" "% or a specific image file can be passed" "% dynamic series can be loaded by passing the series directory path (no file)" "%"
So, did you pass a filename or the directory location of the files?

サインインしてコメントする。

採用された回答

Cris LaPierre
Cris LaPierre 2023 年 6 月 24 日
This sounds like a usecase for an image datastore. Use the datastore to point to your images, and then use the readimage or readall function to load the image(s) using your custom function.
Here's an example from the linked page.
imds = imageDatastore("peppers.png","ReadFcn",@customreader);
imgs = readall(imds);
imshow(imgs{3})

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDICOM Format についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by