Minimal Service Setup for ImgOpener

Michael Zinsmaier michael.zinsmaier at gmx.de
Tue Aug 13 09:37:27 CDT 2013


Hi Curtis,

it does work as minimal setting.
But we discovered that we need more services to get the functionality 
that we need within KNIP (opening all the images that are supported by 
bioformats). So far we added the following services to open some test 
pictures: "FormatService.class, CodecService.class, TiffService.class, 
JAIIIOService.class"

What other services will we need? Or more specific is there a better way 
than incrementally adding services to get a "Bioformats" ImgOpener 
running without discovering unrelated services like HotdrawService...

Best Michael

> Hi Michael,
>
> > What is the minimal set of Services that we need just for the opener?
>
> The noargs ImgOpener constructor is supposed to give you exactly that:
>
> https://github.com/scifio/scifio/blob/8037fd38419030dff000eda84fca9b35909be3a4/scifio/src/main/java/io/scif/img/AbstractImgIOComponent.java#L68
>
> Please let us know if it doesn't work for you!
>
> Regards,
> Curtis
>
>
> On Mon, Aug 12, 2013 at 10:39 AM, Michael Zinsmaier 
> <michael.zinsmaier at gmx.de <mailto:michael.zinsmaier at gmx.de>> wrote:
>
>     Hi all,
>
>     we try to create a suitable context for the ImgOpener but on our
>     classpath are several jar files that contain services which we do
>     not intend to use and which cause problems if discovered (e.g.
>     HotdrawService is discovered but we do not include all required
>     libs...). What is the minimal set of Services that we need just
>     for the opener?
>
>     or more code based:
>
>     given the following methods
>
>         public void foo() {
>             Context c = new Context(getIOContextServices());
>             m_scifio = new SCIFIO(c);
>             FORMATS = m_scifio.format().getAllFormats();
>         }
>
>         private List<Class<? extends Service>> getIOContextServices() {
>             final List services = new ArrayList();
>            services.add(FormatService.class);
>            return services;
>         }
>
>     what would be the minimal list of required services in order to
>     get a suitable Context for the ImgOpener?
>
>     Regards Michael
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://scif.io/pipermail/scifio/attachments/20130813/3cc9eb7b/attachment-0001.html>


More information about the SCIFIO mailing list