[ITK] [ITK-users] SimpleITK | ImagePositionPatient and origins

Matias Montroull matimontg at gmail.com
Wed Mar 25 18:17:51 EDT 2015


Hi,

I was testing the new ImageSeriesWriter in the new SimpleITK 0.9 Beta and
for some reason it's not copying the Image Position Patient information
when writing the slices.

any ideas why this happens?

Here's my code:
  ImageFileReader imgreader_resultado = new ImageFileReader();
            imgreader_resultado.SetFileName(path_pacientes +
nombre_paciente + @"\Fusion\" + "resultado.mha");
            itk.simple.Image imgresultado = imgreader_resultado.Execute();
            ImageSeriesWriter SeriesWriter_resultado = new
ImageSeriesWriter();
            VectorString vs_resultado = new VectorString();
            for (int i = 0; i < imgresultado.GetSize()[2]; ++i)
            {
                vs_resultado.Add(path_pacientes + nombre_paciente +
@"\Fusion\Resultado\" + "imagen" + i + ".dcm");
            }

            SeriesWriter_resultado.SetFileNames(vs_resultado);

            if (!Directory.Exists(path_pacientes + nombre_paciente +
@"\Fusion\Resultado")) //Si se abrió el plan y nunca se hizo registración
previamente, se crea el directorio Registración
            {
                Directory.CreateDirectory(path_pacientes + nombre_paciente
+ @"\Fusion\Resultado");
            }

            SeriesWriter_resultado.Execute(imgresultado, vs_resultado,
false);

Thank you,

Matias.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20150325/c49f767b/attachment.html>
-------------- next part --------------
_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/insight-users


More information about the Community mailing list