[ome-devel] ST FilenamePattern & TheT

Ilya Goldberg igg at nih.gov
Fri Sep 10 01:33:12 BST 2004


On Sep 9, 2004, at 3:14 PM, Joshua Allen Moore wrote:
> However, there's obviously a lot of other goodies in the name. Can we 
> get a hook
> in the importers so we can register import-time modules. I can use it 
> to parse
> the filenames and spit out a few more STs. If so, we've got our time 
> deltas!

Well, yeah.  You just write your importer by copy/paste from 
perl2/OME/ImportEngine/TIFFreader.pm, then you:
psql ome
ome=# select value from configuration where name = 'import_formats';
you'll get a string like so:
OME::ImportEngine::MetamorphHTDFormat OME::ImportEngine::DVreader 
OME::ImportEngine::STKreader OME::ImportEngine::TIFFreader 
OME::ImportEngine::XMLreader

Where each importer is listed in order as a class name.  You just add 
your new importer there before OME::ImportEngine::TIFFreader and you're 
all set:
ome=# update configuration set value='blah blah blah' where name  = 
'import_formats';

Or, you can change the $IMPORT_FORMATS string in 
perl2/OME/Install/CoreDatabaseTablesTask.pm, and it will be set 
correctly when you run install.pl.

The importers are run in order on a list of files, and they eliminate 
files from the list if they recognize the format.  That's why you want 
to put your importer in front of the generic one.

-I



More information about the ome-devel mailing list