I built the example RGBImageReadWrite.cxx using CMake config generate with CMakeLists.txt and source file for the example and generate bin and built that in vs2017… so far so good, but when I run this example with following command line and arguments it crashes in Writer->Update() line in the source file above!?
RGBImageReadWrite.exe BrainMidSagittalSlice.png BrainMidSagittalSlice.rgb
I read the ITK book about using IO architecture and that it does not matter what is the input file the output file will be RGB for this example, am I write or wrong? according to book everything is delegated in different class under itk::ImageIO class and itk::ImageIOFactory so what would be wrong that on call to writer->Update() program crashes? should I change the input file types?