function checkMetadata() % checks metadata of an .ome.tif % Heinrich Grabmayr, 2011-10-24 addpath 'StandardFcns'; % load image: just opens a file dialog with preset standard path [Dateiname, Pfadname] = getOMETIFFfilenames('off'); % calls bfopen r = loadOMETIFF(Pfadname, Dateiname); % get metadata metadata = r{2}; disp '-------------- checkMetadata: Acquiring OMETIFF Metadata --------------' disp(['Image: ', fullfile(Pfadname, Dateiname{1})]); disp(['Image Name: ', char(metadata.getImageName(0))]); % display metadata disp(['Number of Images: ', num2str(metadata.getImageCount())]); disp(['Date Acquired: ', char(metadata.getImageAcquiredDate(0))]); InstrCnt = metadata.getInstrumentCount(); disp(['Instrument Count: ', num2str(InstrCnt)]); if InstrCnt > 0 DetCnt = metadata.getDetectorCount(0); disp(['Detector Count: ', num2str(DetCnt)]); if DetCnt > 0 disp(['Detector Model: ', char(metadata.getDetectorModel(0,0))]); end ObjCnt = metadata.getObjectiveCount(0); disp(['Objective Count: ', num2str(ObjCnt)]); if ObjCnt > 0 disp(['Objective Manufacturer: ', char(metadata.getObjectiveManufacturer(0,0))]); disp(['Objective Lens NA: ', num2str(double(metadata.getObjectiveLensNA(0,0)))]); end end ChanCnt = metadata.getChannelCount(0); disp(['Number of Channels: ', num2str(ChanCnt)]); if ChanCnt > 0 PlaneCnt = metadata.getPlaneCount(0); disp(['Number of Planes: ', num2str(PlaneCnt)]); if PlaneCnt > 0 disp(['ExposureTime: ', num2str(metadata.getPlaneExposureTime(0,0).getValue())]); end disp(['X size: ', num2str(metadata.getPixelsSizeX(0).getValue())]); disp(['Physical X size: ', num2str(metadata.getPixelsPhysicalSizeX(0))]); for i=1:ChanCnt disp(['Dye of Channel ', num2str(i), ': ', char(metadata.getChannelFluor(0,i-1))]); end end disp '----------------------- done -----------------------------------------'