[ITK-users] ImageSeriesWriter | SimpleITK

Matias Montroull matimontg at gmail.com
Tue Mar 24 13:56:12 EDT 2015


Bradley,

Here's what I'm testing now (I'm trying to write a series of slices from a
mha file)


            ImageFileReader imgreader = new ImageFileReader();
            imgreader.SetFileName(path_pacientes + nombre_paciente +
@"\Fusion\" + "resultado.mha");
            itk.simple.Image imgtest = imgreader.Execute();
            ImageSeriesWriter SeriesWriter = new ImageSeriesWriter();
            VectorString vs = new VectorString();

//Here's where I struggle...
            vs.Add(path_pacientes + nombre_paciente +
@"\Fusion\SalidaTest\imagen%03d.dcm"); //Is this rthe right way to include
a vector of strings?
            SeriesWriter.SetFileNames(vs);


On Tue, Mar 24, 2015 at 2:50 PM, Bradley Lowekamp <blowekamp at mail.nih.gov>
wrote:

> Yes, it you should use the VectorString SimpleITK for CSharp has for the
> fileNames argument.
>
> If you are having trouble please provide a small example, and what the
> error/problem is.
>
> Brad
>
> On Mar 24, 2015, at 1:45 PM, Matias Montroull <matimontg at gmail.com> wrote:
>
> Hi,
>
> I'm looking for an example on how to convert an mhd or mha image into
> slices. I downloaded SimpleITK V0.9 Beta and was playing around with the
> new ImageSeriesWriter class but can't figure out how to do it.
> Do I need to declare a VectorString?
> Thanks,
>
> Matias.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/insight-users/attachments/20150324/e9b76f0e/attachment.html>


More information about the Insight-users mailing list