<div dir="ltr">Try this example:<br><a href="http://www.itk.org/Doxygen46/html/IO_2ImageReadWrite_8cxx-example.html">http://www.itk.org/Doxygen46/html/IO_2ImageReadWrite_8cxx-example.html</a><br><div><br></div><div>What type of images you want to copy?</div></div><br><div class="gmail_quote"><div dir="ltr">El lun., 6 de jul. de 2015 a la(s) 6:00 a. m., Constantinus Spanakis <<a href="mailto:c.spanakis83@gmail.com">c.spanakis83@gmail.com</a>> escribió:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello, I want to copy an image. But all I get is a blank image. What;s<br>
the problem? Here is the code:<br>
<br>
#include "itkImage.h"<br>
#include "itkImageFileReader.h"<br>
#include "itkImageFileWriter.h"<br>
<br>
#define NULL 0<br>
<br>
int main(int argc, char *argv[]){<br>
        const char *filename=argv[1];<br>
        const char *filename2=argv[2];<br>
        typedef itk::Image< unsigned short, 2 > ImageType;<br>
        typedef itk::ImageFileReader<ImageType> Reader;<br>
        typedef itk::ImageFileWriter<ImageType> Writer;<br>
<br>
<br>
<br>
        Reader::Pointer reader=Reader::New();<br>
<br>
        reader->SetFileName(filename);<br>
        ImageType::Pointer image=reader->GetOutput();<br>
        reader->Update();<br>
<br>
<br>
<br>
<br>
<br>
        Writer::Pointer writer=Writer::New();<br>
<br>
<br>
<br>
<br>
        writer->SetFileName(filename2);<br>
        writer->SetInput(reader->GetOutput());<br>
        writer->Update();<br>
<br>
<br>
<br>
        return EXIT_SUCCESS;<br>
}<br>
_______________________________________________<br>
Community mailing list<br>
<a href="mailto:Community@itk.org" target="_blank">Community@itk.org</a><br>
<a href="http://public.kitware.com/mailman/listinfo/community" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/community</a><br>
</blockquote></div><div dir="ltr">-- <br></div><div dir="ltr">Matias</div>