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일
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

Thanks a lot
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 Exchange에서 Read, 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