From c9fbc6a4237fc5a1fed73fa6685ea90b3359439b Mon Sep 17 00:00:00 2001 From: tpietzsch Date: Thu, 29 Aug 2024 10:45:59 +0200 Subject: [PATCH] Add SpimData constructors with basePathURI --- src/main/java/mpicbg/spim/data/SpimData.java | 6 ++++++ .../java/mpicbg/spim/data/generic/AbstractSpimData.java | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/main/java/mpicbg/spim/data/SpimData.java b/src/main/java/mpicbg/spim/data/SpimData.java index 5563757..1ed3375 100644 --- a/src/main/java/mpicbg/spim/data/SpimData.java +++ b/src/main/java/mpicbg/spim/data/SpimData.java @@ -29,6 +29,7 @@ package mpicbg.spim.data; import java.io.File; +import java.net.URI; import mpicbg.spim.data.generic.AbstractSpimData; import mpicbg.spim.data.registration.ViewRegistrations; @@ -41,6 +42,11 @@ public SpimData( final File basePath, final SequenceDescription sequenceDescript super( basePath, sequenceDescription, viewRegistrations ); } + public SpimData( final URI basePathURI, final SequenceDescription sequenceDescription, final ViewRegistrations viewRegistrations ) + { + super( basePathURI, sequenceDescription, viewRegistrations ); + } + protected SpimData() {} } diff --git a/src/main/java/mpicbg/spim/data/generic/AbstractSpimData.java b/src/main/java/mpicbg/spim/data/generic/AbstractSpimData.java index 4ae9c3e..0c0b55f 100644 --- a/src/main/java/mpicbg/spim/data/generic/AbstractSpimData.java +++ b/src/main/java/mpicbg/spim/data/generic/AbstractSpimData.java @@ -47,7 +47,12 @@ public class AbstractSpimData< S extends AbstractSequenceDescription< ?, ?, ? > public AbstractSpimData( final File basePath, final S sequenceDescription, final ViewRegistrations viewRegistrations ) { - this.basePathURI = basePath == null ? null : basePath.toURI(); + this( basePath == null ? null : basePath.toURI(), sequenceDescription, viewRegistrations ); + } + + public AbstractSpimData( final URI basePathURI, final S sequenceDescription, final ViewRegistrations viewRegistrations ) + { + this.basePathURI = basePathURI; this.sequenceDescription = sequenceDescription; this.viewRegistrations = viewRegistrations; }