フィルターのクリア

filtering for DICOM files that have no .dcm extension

3 ビュー (過去 30 日間)
Victoria Klimaj
Victoria Klimaj 2013 年 9 月 28 日
コメント済み: Walter Roberson 2013 年 9 月 29 日
Hi,
I am trying to run a MATLAB script that deals with DICOM files and would like the script to go into individual folders and grab all of the DICOMs within each folder. However, I am having trouble doing so because my DICOMs don't have a specific extension that I can filter for (no .dcm extensions; they are "Unix Executable Files").
Is there any other aspect of these DICOM files that I might be able to easily filter for? All I really want to do is skip over the ".", ".." and ".DS_Store" hidden files by doing so. I was considering filtering by name (the are all named a series of 8 numbers) but that seems like it would require another loop and I am wondering if there is an easier way to do this.
inputs{1, crun} = cellstr(spm_select('FPList'[allinput,'T1Rawunzip',filesep,OrderForDicoms3{1,crun}],'****'))
^Above is the way I currently have it set up ("allinput" is a path that is specified earlier, T1RawUnzip is a folder name, and OrderForDicoms3{1,crun} is referring to a mat file that has specific folder extensions listed).
What could go in the "****", or how could I edit this line in conjunction with other elements of the code so that it grabs the DICOMs and nothing else?
Thanks!
-Victoria

回答 (2 件)

Walter Roberson
Walter Roberson 2013 年 9 月 28 日
If you are using an OS-X or Linux system, then the file pattern "*" should refuse to match file or directory names that start with "."
  2 件のコメント
Victoria Klimaj
Victoria Klimaj 2013 年 9 月 28 日
I tried the single '*' but it also didn't work. Maybe the issue is elsewhere in the line...
Victoria Klimaj
Victoria Klimaj 2013 年 9 月 28 日
For some reason the '*' ended up causing errors (error specified code got stuck on ".DS_Store" I ended up adding the word "dicom" to the beginning of each file name with an automator loop and then filtering by that. Strange that the wildcard asterisk matched the files starting with "." when it's not supposed to

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


Matt J
Matt J 2013 年 9 月 28 日
編集済み: Matt J 2013 年 9 月 28 日
You might try this FEX submission
I've used it to import images without DCM extensions, although I don't know if they were Unix Executable Files.
  1 件のコメント
Walter Roberson
Walter Roberson 2013 年 9 月 29 日
"Unix Executable File" is reported for files that have the "x" (execute) permission bit set in any of their basic permission access groups (user, group, other)

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

カテゴリ

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