/[gr2lib]/trunk/gr2lib_UnitTest/Program.cs
ViewVC logotype

Diff of /trunk/gr2lib_UnitTest/Program.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/gr2lib_UnitTest/Program.cs	2010/07/15 19:28:46	76
+++ trunk/gr2lib_UnitTest/Program.cs	2010/07/15 19:28:57	77
@@ -11,11 +11,11 @@
 
 namespace gr2lib_UnitTest
 {
-    
+
     class Program
     {
         static void Main(string[] args)
-        {            
+        {
             string GrannyFilename = shared.GRANNY_TEST_FILE;
             try
             {
@@ -47,7 +47,7 @@
                 }
                 else if (args.Length > 1)
                 {
-                    throw new InvalidOperationException("ERROR: Recieved Invalid Commandline: " + new arraytostring<string,string[]>(args));
+                    throw new InvalidOperationException("ERROR: Recieved Invalid Commandline: " + new arraytostring<string, string[]>(args));
                 }
 
                 if (System.IO.File.Exists(GrannyFilename))
@@ -91,8 +91,8 @@
                     Console.WriteLine("Exporter Info:");
                     Console.WriteLine("\tExporter Name: " + info.ExporterInfo.ExporterName);
 
-                    Console.WriteLine("\tExporter Version: " + 
-                        string.Format("{0}.{1}.{2}.{3}", 
+                    Console.WriteLine("\tExporter Version: " +
+                        string.Format("{0}.{1}.{2}.{3}",
                             info.ExporterInfo.ExporterMajorRevision,
                             info.ExporterInfo.ExporterMinorRevision,
                             info.ExporterInfo.ExporterCustomization,
@@ -117,6 +117,20 @@
                         Console.WriteLine("\tShiftForComponent: " + new arraytostring<int, int[]>(t.Layout.ShiftForComponent));
                         Console.WriteLine("\tBitsForComponent: " + new arraytostring<int, int[]>(t.Layout.BitsForComponent));
                         // images
+                        Console.WriteLine("\tImage List:");
+                        foreach (Image img in t.Images)
+                        {
+                            foreach (MIPLevel mip in img.MIPLevels)
+                            {
+                                Console.WriteLine("\t\tMipLevel Stride: " + mip.Stride);
+                                if (mip.Pixels.Count > 0)
+                                {
+                                    Console.WriteLine("\t\tMipLevel Pixel: " + "{Pixel Data " + "[" + mip.Pixels.Count + "]}");
+                                    //// export image
+                                    //mip.Pixels.Export(@"exported_images\" + t.FromFileName.Name, t.Width, t.Height, mip.Stride);
+                                }
+                            }
+                        }
                         Console.WriteLine("\tExtendedData: " + t.ExtendedData);
                         Console.WriteLine();
                     }

 

  ViewVC Help
Powered by ViewVC 1.1.22