using System;
namespace itk.simple.examples {
class ImageIOSelection {
static void Main(string[] args) {
try {
if (args.Length < 1) {
Console.WriteLine("Usage: ImageIOSelection image_input_file");
return;
}
Console.Write("The supported image IOs are: ");
for (int i=0; i<image_ios.Count; i++) {
Console.Write(image_ios[i] + " ");
}
Console.WriteLine("\n--------------------");
Console.WriteLine("--------------------");
Console.WriteLine("Read image: " + args[0]);
VectorUInt32 size = image.
GetSize();
Console.WriteLine( "Image size: " + size[0] + " " + size[1] );
} catch (Exception ex) {
Console.WriteLine("Read failed: " + ex);
}
}
}
}
Read an image file and return a SimpleITK Image.
std::string ToString() const override
Image Execute() override
Set/Get The output PixelType of the image.
Self & SetFileName(const PathType &fn)
virtual std::vector< std::string > GetRegisteredImageIOs() const
Get a vector of the names of registered itk ImageIOs.
virtual Self & SetImageIO(const std::string &imageio)
Set/Get name of ImageIO to use.
The Image class for SimpleITK.
std::vector< unsigned int > GetSize() const