import mmcorej.TaggedImage;

import org.json.JSONObject;
import org.micromanager.acquisition.TaggedImageStorageDiskDefault;
import org.micromanager.api.TaggedImageStorage;


public class ReadDataSet {

   public static void main(String[] args) {
      //String rootName = "C:/AcqusitionData/Tests/Test-A_1";
      String rootName = "C:/AcqusitionData/20130813 Oxidative Stress Test 3/NIH3T3_1";
      
      try {
         TaggedImageStorage storage = new TaggedImageStorageDiskDefault(rootName);
         JSONObject summary = storage.getSummaryMetadata();
         System.out.println(summary.toString(3));
         
         int numChannels = summary.getInt("Channels");
         int numSlices = summary.getInt("Slices");
         int numFrames = summary.getInt("Frames");
         int numPositions = summary.getInt("Positions");
         
         for (int pos=0; pos < numPositions; pos++) {
            for (int fr=0; fr<numFrames; fr++) {
               TaggedImage img = storage.getImage(0, 0, fr, pos);
               System.out.println(img.tags.toString(3));
            }
         }
         
      } catch (Exception e) {
         // TODO Auto-generated catch block
         e.printStackTrace();
      }

   }

}

@@ -117,24 +117,61 @@
 skDefault;%0D%0A
+import org.micromanager.api.MMTags;%0D%0A
 import org.m
@@ -292,18 +292,16 @@
 %0D%0A      
-//
 String r
@@ -351,96 +351,8 @@
 %22;%0D%0A
-      String rootName = %22C:/AcqusitionData/20130813 Oxidative Stress Test 3/NIH3T3_1%22;%0D%0A
     
@@ -621,18 +621,31 @@
 Int(
-%22Channels%22
+MMTags.Summary.CHANNELS
 );%0D%0A
@@ -688,16 +688,29 @@
 Int(
-%22Slices%22
+MMTags.Summary.SLICES
 );%0D%0A
@@ -753,16 +753,29 @@
 Int(
-%22Frames%22
+MMTags.Summary.FRAMES
 );%0D%0A
@@ -821,19 +821,32 @@
 Int(
-%22Positions%22
+MMTags.Summary.POSITIONS
 );%0D%0A
@@ -936,16 +936,14 @@
 int 
-fr
+t
 =0; 
-fr
+t
 %3Cnum
@@ -954,17 +954,130 @@
 es; 
-fr++) %7B%0D%0A
+t++) %7B%0D%0A               for (int z=0; z%3CnumSlices; z++) %7B%0D%0A                  for (int ch=0; ch%3CnumChannels; ch++) %7B%0D%0A      
     
@@ -1126,16 +1126,16 @@
 age(
-0, 0, fr
+ch, z, t
 , po
@@ -1135,24 +1135,156 @@
 , t, pos);%0D%0A
+                     Object pixels = img.pix;%0D%0A                     // TODO: do something with pixels%0D%0A                     %0D%0A      
             
@@ -1321,32 +1321,71 @@
 .toString(3));%0D%0A
+                  %7D%0D%0A               %7D%0D%0A
             %7D%0D%0A 

Read data set up updated