How do i write data to a specfic path without using cd(path)?

Hi all,
I want to save data using dicomwrite, does anyone now how i can use a specific path in the dicomwriteline?
so i want to use something like: fpath = uigetdir; dicomwrite (fpath, serie, name, info)
how should i do this?

 採用された回答

Mischa Kim
Mischa Kim 2014 年 2 月 10 日
編集済み: Mischa Kim 2014 年 2 月 10 日

0 投票

Hugo, try
dicomwrite(X, strcat(uigetdir,'myfilename.dcm'));
where X represents the image to be written. Of course, you can replace the hard-coded filename with any valid string variable.

2 件のコメント

Hugo
Hugo 2014 年 2 月 10 日
Thanks a lot
Jos (10584)
Jos (10584) 2014 年 2 月 10 日
Pathnames are OS specific (e.g. windows uses backslash while decent operating systems use a forward slash). To concatenate directories and files, independent of OS, you are advised to use FULLPATH
directoryName = uigetdir
fullname = fullpath(directoryName, FileName)

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeRead, Write, and Modify Image についてさらに検索

質問済み:

2014 年 2 月 10 日

コメント済み:

2014 年 2 月 10 日

Community Treasure Hunt

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

Start Hunting!

Translated by