How to best read in specific number values from large quantity of dicom images
1 view (last 30 days)
Show older comments
I want to read in the value (100\250) from following unique lines in a large .ima file (can be read in notepad):
- sAngio.sFlowArray.asElm[0].nVelocity = 100
- sAngio.sFlowArray.asElm[0].nDir = 4
- sAngio.sFlowArray.asElm[1].nVelocity = 100
- sAngio.sFlowArray.asElm[1].nDir = 1
with:
fid = fopen ('filename')
expTP = fscanf(fid,'%[asElm[0].nVelocity =*^\n')
vencTP=regexp(expTP,%d,'match')
vencTP = str2num(vencTP)
expPE = fscanf(fid,'%[asElm[1].nVelocity =*^\n')
vencPE = regexp(expPE,%d,'match')
vencPE = str2num(vencPE)
Questions: 1) I have 560 .ima files all with 3xn.Velocity information each, is it the best way to 'fopen' all of them or is there a better way?
2) Its not working and I can't figure out why. Is my expr wrong for regexp fct?
0 Comments
Answers (1)
See Also
Categories
Find more on Convert Image Type in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!