Frederic Marion-Poll July 26, 2019 at 9:28 pm
To use VideoImporter, I took as an example the code from fab, as found in the plugin SingleMouseTracker. To read a file and get info from an AVI file, it looks like this:
VideoImporter importer = new VideoImporter();
status = EnumStatus.AVIFILE;
importer.open( fileName, 0 );
OMEXMLMetadataImpl metaData = importer.getMetaData();
nTotalFrames = MetaDataUtil.getSizeT( metaData, 0 ) – 2 ; // get one frame less as there is a little bug in the decompression of the video in h264
Under Eclipse, “getMetaData” and “getSizeT” are noted as “deprecated” (and they are tagged as such in Stephane’s code). What is the correct version to be used?
Should we simply replace OMEXMLMetaData by OMEXMLMetadata? like this:
OMEXMLMetadata metaData = importer.getOMEXMLMetaData();
nTotalFrames = MetaDataUtil.getSizeT( metaData, 0 ) – 2 ;
Are these structures equivalent? (OMEXMLMetadata and OMEXMLMetadataImpl)
fredStephane Dallongeville July 30, 2019 at 2:23 pm
Indeed you need to use the importer.getOMEXMLMetaData() method now, this is because internally Bio-Formats refactored some of their classes a long time ago so we had to change the interface but it does not make any differences (OMEXMLMetadata is the interface while OMEXMLMetadataImpl is the class implementing this interface and it’s better to work from the interface).
You must be logged in to reply to this topic.