Minimal Service Setup for ImgOpener

Curtis Rueden ctrueden at wisc.edu
Mon Aug 12 13:29:49 CDT 2013


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> 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/20130812/c756214a/attachment-0001.html>


More information about the SCIFIO mailing list