@idetik/core 0.2.2 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -133,19 +133,10 @@ type SliceCoordinates = {
133
133
  type ChunkSource = {
134
134
  open(): Promise<ChunkLoader>;
135
135
  };
136
- type LoaderAttributes = {
137
- dimensionNames: string[];
138
- dimensionUnits: (string | undefined)[];
139
- chunks: readonly number[];
140
- shape: readonly number[];
141
- scale: readonly number[];
142
- translation: readonly number[];
143
- };
144
136
  type ChunkLoader = {
145
137
  loadRegion(input: Region, lod: number, scheduler?: PromiseScheduler): Promise<Chunk>;
146
138
  getSourceDimensionMap(): SourceDimensionMap;
147
139
  loadChunkData(chunk: Chunk, signal: AbortSignal): Promise<void>;
148
- getAttributes(): ReadonlyArray<LoaderAttributes>;
149
140
  };
150
141
 
151
142
  declare class ChunkStore {
@@ -1270,14 +1261,12 @@ declare class OmeZarrImageLoader {
1270
1261
  private readonly metadata_;
1271
1262
  private readonly arrays_;
1272
1263
  private readonly arrayParams_;
1273
- private readonly loaderAttributes_;
1274
1264
  private readonly dimensions_;
1275
1265
  constructor(props: OmeZarrImageLoaderProps);
1276
1266
  getSourceDimensionMap(): SourceDimensionMap;
1277
1267
  loadChunkData(chunk: Chunk, signal: AbortSignal): Promise<void>;
1278
1268
  private trimChunkPadding;
1279
1269
  loadRegion(region: Region, lod: number, scheduler?: PromiseScheduler): Promise<Chunk>;
1280
- getAttributes(): ReadonlyArray<LoaderAttributes>;
1281
1270
  private regionToIndices;
1282
1271
  }
1283
1272
 
@@ -1592,22 +1581,38 @@ type OmeroChannel = OmeroMetadata["channels"][number];
1592
1581
  declare function loadOmeroChannels(source: OmeZarrImageSource): Promise<OmeroChannel[]>;
1593
1582
  declare function loadOmeroDefaults(source: OmeZarrImageSource): Promise<OmeroMetadata["rdefs"]>;
1594
1583
 
1584
+ type HttpOmeZarrImageSourceProps = {
1585
+ url: string;
1586
+ version?: Version;
1587
+ };
1588
+ type FileSystemOmeZarrImageSourceProps = {
1589
+ directory: FileSystemDirectoryHandle;
1590
+ version?: Version;
1591
+ path?: `/${string}`;
1592
+ };
1595
1593
  /** Opens an OME-Zarr multiscale image Zarr group from either a URL or local directory. */
1596
1594
  declare class OmeZarrImageSource {
1597
1595
  readonly location: Location<Readable>;
1598
1596
  readonly version?: Version;
1597
+ private constructor();
1598
+ open(): Promise<OmeZarrImageLoader>;
1599
1599
  /**
1600
+ * Creates an OmeZarrImageSource from an HTTP(S) URL.
1601
+ *
1600
1602
  * @param url URL of Zarr root
1603
+ * @param version OME-Zarr version
1601
1604
  */
1602
- constructor(url: string, version?: Version);
1605
+ static fromHttp(props: HttpOmeZarrImageSourceProps): OmeZarrImageSource;
1603
1606
  /**
1607
+ * Creates an OmeZarrImageSource from a local filesystem directory.
1608
+ *
1604
1609
  * @param directory return value of `window.showDirectoryPicker()` which gives the browser
1605
1610
  * permission to access a directory (only works in Chrome/Edge)
1611
+ * @param version OME-Zarr version
1606
1612
  * @param path path to image, beginning with "/". This argument allows the application to only
1607
1613
  * ask the user once for permission to the root directory
1608
1614
  */
1609
- constructor(directory: FileSystemDirectoryHandle, version?: Version, path?: `/${string}`);
1610
- open(): Promise<OmeZarrImageLoader>;
1615
+ static fromFileSystem(props: FileSystemOmeZarrImageSourceProps): OmeZarrImageSource;
1611
1616
  }
1612
1617
 
1613
1618
  declare class Plane {