[ITK Community] Filename number incrementation

Luis Ibanez luis.ibanez at kitware.com
Sun Mar 16 16:16:44 EDT 2014


Anna

Could you please share the sections of the code where;

A) you get the string from argv

and

B) where you pass it to the FileNames generator class

They may help find the source of the problem.

  Thanks


      Luis



On Wed, Mar 5, 2014 at 2:29 AM, Annabelle Dupuis
<dupuis.annabelle at yahoo.fr>wrote:

> Hi Matt, thanks for your awnser.
>
> Well concerning the pattern "Dicom_SliceLocation_00%d.dcm", it stop
> working once I reach 010 because it cannot find the file
> "Dicom_SliceLocation_00010.dcm" (should be Dicom_SliceLocation_010.dcm).
>
> Now concerning the pattern "Dicom_SliceLocation_%03d.dcm" well on the
> command windows were I get the error, the figure "%03" is replaced by a
> "heart" (yeah u read it right, the symbole of a heart!) so he cant find the
> file Dicom_SliceLocation_'heart'd.dcm
> (I precise that those paterns are in the command argument line in the
> debugging options).
>
> Any suggestion?
>
> thanks
>
>
>
>   Le Mardi 4 mars 2014 22h19, Matt McCormick <matt.mccormick at kitware.com>
> a écrit :
>  Hi Annabelle,
>
> That looks like it should be correct.  How did it fail?
>
> Thanks,
> Matt
>
>
> On Tue, Mar 4, 2014 at 12:22 PM, Annabelle Dupuis <
> dupuis.annabelle at yahoo.fr> wrote:
>
> Hi guys,
>
> I'm trying to apply a script over a serie of slices of MRI.
> The pattern of the filename is in the argument argv[1] and looks like
>
> "Dicom_SliceLocation_00%d.dcm"
>
> Hence it load the images Dicom_SliceLocation_000.dcm
> Dicom_SliceLocation_001.dcm
> Dicom_SliceLocation_002.dcm
> Dicom_SliceLocation_003.dcm
> etc..
> but once I don't know how to do it for the images number 010, 011 etc...
>
> I tried to write an image pattern like "Dicom_SliceLocation_%03d.dcm" like
> they stated on the wiki example page
> www.itk.org/Wiki/ITK/Examples/Utilities/NumericSeriesFileNames
> But it didnt work!
> (VS 2010 and Wndows 8).
>
> Can someone help me please?
> thanks
>
> Anna
>
> _______________________________________________
> Community mailing list
> Community at itk.org
> http://public.kitware.com/cgi-bin/mailman/listinfo/community
>
>
>
>
>
> _______________________________________________
> Community mailing list
> Community at itk.org
> http://public.kitware.com/cgi-bin/mailman/listinfo/community
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20140316/f07cb613/attachment-0002.html>


More information about the Community mailing list