Metadata batch export

Is there a way to script a batch export that will list in a table:

  1. Image name
  2. Image Magnification
  3. Image Resolution / or pixel width
  4. Image Width
  5. Image Height

Thank you

This script will print the information (or write to it a file with a bit of modification):

def metadata = []
def delim = '\t'
for (entry in getProject().getImageList()) {
    def imageData = entry.readImageData()
    def server = imageData.getServer()
    metadata << String.join(delim,
        [entry.getImageName(),
        server.getMetadata().getMagnification(),
        server.getPixelCalibration().getAveragedPixelSize(),
        server.getWidth(),
        server.getHeight()] as String[]
        )
}

def output = String.join(System.lineSeparator, metadata)
print output

// To write to a file, use something like this
// new File('/path/to/file.txt').text = output
2 Likes

Thank you, much appreciated

1 Like