From: Ammar Siddiqui on
Hi.
I need to rearrange CT image series according to their InstanceNumber.
For example
info.ImageInstance
ans = 5
How can i use this value in writing a dicom image(eg. IM5.dcm or just5.dcm ).I am trying dicomwrite but every time i have to give name myself.
Regards
From: Walter Roberson on
Ammar Siddiqui wrote:

> I need to rearrange CT image series according to their InstanceNumber.
> For example info.ImageInstance
> ans = 5
> How can i use this value in writing a dicom image(eg. IM5.dcm or
> just5.dcm ).I am trying dicomwrite but every time i have to give name
> myself. Regards

filename = sprintf('IM%d.dcm', info.ImageInstance);
dicomwrite(filename, ....)