+typedef struct
+{
+ int sizeX; // Size X of the image
+ int sizeY; // Size Y of the image
+ int sizeZ; // Size Z of the image
+ int components; // Number of components for a pixel
+ int componentSize; // Component size (in bits : 8, 16)
+ int componentUse ; // Component size (in bits)
+ int sign; // Sign of components
+ char writeMode; // Write mode
+ // - 'a' : ACR
+ // - 'e' : Explicit VR
+ // - 'i' : Implicit VR
+} Image;
+
+Image Images [] = {
+ {256, 256, 1, 1, 8, 8, 0, 'a'},
+ {256, 256, 1, 1, 8, 8, 0, 'e'},
+ {256, 256, 1, 1, 8, 8, 0, 'i'},
+
+ {512, 256, 1, 1, 8, 8, 0, 'a'},
+ {512, 256, 1, 1, 8, 8, 0, 'e'},
+ {512, 256, 1, 1, 8, 8, 0, 'i'},
+
+ {256, 512, 1, 1, 8, 8, 0, 'a'},
+ {256, 512, 1, 1, 8, 8, 0, 'e'},
+ {256, 512, 1, 1, 8, 8, 0, 'i'},
+
+ {256, 512, 1, 1, 16, 16, 0, 'a'},
+ {256, 512, 1, 1, 16, 16, 0, 'e'},
+ {256, 512, 1, 1, 16, 16, 0, 'i'},
+ {256, 512, 1, 1, 16, 16, 0, 'a'},
+ {256, 512, 1, 1, 16, 16, 0, 'e'},
+ {256, 512, 1, 1, 16, 16, 0, 'i'},
+ {0, 0, 1, 1, 8, 8, 0, 'i'} // to find the end
+};
+
+int WriteSimple(Image &img)