<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hello,<div><br><div><div>On Mar 24, 2015, at 1:56 PM, Matias Montroull <<a href="mailto:matimontg@gmail.com">matimontg@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">//Here's where I struggle...</div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"> vs.Add(path_pacientes + nombre_paciente + @"\Fusion\SalidaTest\imagen%03d.dcm"); //Is this rthe right way to include a vector of strings</div></blockquote><br></div><div><br></div><div>No that is not the write way. You actually need to create the list for file names. You needs something closer to what's here in the C++ test [1] but converted to CSharp. The length of the list must match the z size of the images.</div><div><br></div><div>Many languages have convenient generator expressions or list comprehensions, which seems more natural than C printf formatting and the perils associated with it.</div><div><br></div><div>The long way to do it is just write a little for loop, something like:</div><div><br></div><div>for (i=0; i < img.GetSize()[2], ++i)</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>vs.Add( "name {0}.ext".Format(i))</div><div><br></div><div>Brad</div><div><br></div><div>[1] <a href="https://github.com/SimpleITK/SimpleITK/blob/master/Testing/Unit/IOTests.cxx#L123-L152">https://github.com/SimpleITK/SimpleITK/blob/master/Testing/Unit/IOTests.cxx#L123-L152</a></div><br></div></body></html>