[ome-devel] Re: [ome-users] importing multiples pixel sets ?
kris
kris at cs.ucsb.edu
Tue Jan 31 00:28:39 GMT 2006
I've modified our image importers to add pixel sets
to an image if the basename of an image file
is the same as an existing image.
The process is very similar to the way a single
5D image is composed from several distinct files.
i.e __getRegexGroups allows several distinct files to define
a pixel set.
In our case, a group of files define a single pixel
set of a related image. We determine related pixel
sets using a regexp..For example a projection/Z-series
image has a P/Z embedded in the Name. Color enhanced
image pixels sets have a trailing tag (_enhanced).
However, I now face an issue that I would like
to distinguish those pixel sets in the interface.
I would like to label some 3-d pixel set as 'zseries'
and the related projection as 'projection',
the enhanced pixles 'color equalized', etc.
We can then modify our interface code to select
the proper pixel set based on the context or user options.
One could also be labeled 'default' for general queries.
I think the most natural place would be a string tag in the
"Pixels" Semantic Type. What is the general opinion
out there? Would this be useful to anyone else or
is there a better alternative?
Bringing me to second question:
Why can we not currently redefine a semantic
type once it's imported into the system? In most
cases I would like to add/delete a column which are
operations supported by postgres. Is there an
accepted alternative currently other than going
through and either removing the offending semantic
type by hand and re-importing or by doing it some low-level
sql operations?
Thanks for any pointers,
kris
On Wed, 2006-01-11 at 17:03 -0500, Josiah Johnston wrote:
> I think your best bet will be a custom importer or a perl script. The
> API for creating module executions, and tying inputs and outputs to
> them is readily available to perl scripts. The relevant functions are
> in OME/src/perl2/OME/Tasks/ModuleExecutionManager.pm
>
> The steps to the scripts roughly are:
> write a placeholder module to describe each transformation. You can
> base this off a combination of
> OME/src/xml/OME/Annotations/AnnotationModule.ome and
> OME/src/xml/OME/Analysis/Filters/HighPassFilter.ome
> write a script that, given an original image file and a derived image,
> will
> i) import the original image into OME,
> ii) use OME::Tasks::ModuleExecutionManager->createMEX(...) to initiate
> an 'execution' of your placeholder module against your newly imported
> image
> iii) use OME::Tasks::ModuleExecutionManager->addActualInput(...) to
> register the image's pixels as inputs to your new MEX
> iv) use OME::Tasks::PixelsManager->createPixels(...) to start a new set
> of pixels that will store your derived image
> v) use the returned $pixels_data object to write the derived image's
> binary data to the image server
> vi) use OME::Tasks::PixelsManager->finishPixels(...) to finalize the
> pixels
> vii) register the mex as finished by calling $MEX->status( 'FINISHED' );
> viii) commit the database transaction (e.g.
> $session->commitTransaction() )
>
> Ideally, you would also set the timing information for the MEX, but
> that's somewhat optional.
>
> The alternative is to write module wrappers for your transformations,
> and execute a chain on the original images. If your transformations can
> be executed on the command line, then I will fix the command line
> handler to execute one of your functions. I have been contemplating
> fixing it for a while, but lack a use case.
>
> -Josiah
>
> On Jan 11, 2006, at 4:31 PM, kristian kvilekval wrote:
>
> >
> > We have several related images that could possible
> > be stored as pixel sets. These include
> > Z-series, projections, normalized images
> > and color equalized images.
> >
> > These are currently stored in different files.
> > Is there an easy way to import these as several
> > pixel sets of the same image or will a custom importer need
> > to be written.
> >
> > In a similar vein, we would like capture the relationship
> > between the pixel sets using something similar to a module
> > execution identifier. Is this supported?
> >
> > Thanks,
> > kris
> >
> > --
> > Kristian Kvilekval
> > kris at cs.ucsb.edu http://www.cs.ucsb.edu/~kris w:805-893-2526
> > h:504-9756
> >
> > _______________________________________________
> > ome-users mailing list
> > ome-users at lists.openmicroscopy.org.uk
> > http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users
> >
--
Kristian Kvilekval
kris at cs.ucsb.edu http://www.cs.ucsb.edu/~kris w:805-893-2526 h:504-9756
More information about the ome-devel
mailing list