loci.formats.tools

## Class FakeImage

- java.lang.Object
- - loci.formats.tools.FakeImage

-     public class FakeImage
      extends java.lang.Object

  Generates fake image structures. Methods defensively check caller-supplied arguments and throw relevant exceptions where needed.
  Since:
    5.0
  Author:
    Blazej Pindelski, bpindelski at dundee.ac.uk

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private loci.common.Location` | `directoryRoot`
    `private static org.slf4j.Logger` | `LOGGER`
    `private ResourceNamer` | `resourceNamer`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FakeImage(loci.common.Location directoryRoot)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `loci.common.Location` | `generateScreen(int plates, int plateAcquisitions, int rows, int columns, int fields)` Creates a fake SPW file/directory structure.
    `static void` | `isValidRange(int arg, int min, int max)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### LOGGER

          private static final org.slf4j.Logger LOGGER

    - #### directoryRoot

          private loci.common.Location directoryRoot

    - #### resourceNamer

          private ResourceNamer resourceNamer

  - ### Constructor Detail

    - #### FakeImage

          public FakeImage(loci.common.Location directoryRoot)

  - ### Method Detail

    - #### isValidRange

          public static void isValidRange(int arg,
                                          int min,
                                          int max)

    - #### generateScreen

          public loci.common.Location generateScreen(int plates,
                                                     int plateAcquisitions,
                                                     int rows,
                                                     int columns,
                                                     int fields)

      Creates a fake SPW file/directory structure. Maximum supported size is a 384-well plate with multiple runs and fields. All arguments indicating plate or well element count must be at least `1` and cannot be `null`. The structure appears on the file system as:

           foo.fake/
           └── Plate000/
               └── Run000/
                   └── WellA000/
                       └── Field000.fake
                           ...
                       ...
                       WellA254/
                       WellB000/
                       ...
                       WellAA000/
                       ...
                   Run001/
                   ...
               Plate001/
               ...

      Parameters:
        `plates` - Number of plates in a screen (max 255).
        `plateAcquisitions` - Number of plate acquisitions (runs) in a plate (max 255).
        `rows` - Number of rows in a plate (max 255).
        `columns` - Number of columns in a plate (max 255).
        `fields` - Number of fields for a plate acquisition (max 255).
      Returns:
        `Location` Instance representing the top-level directory of the SPW structure.
      Throws:
        `java.lang.IllegalArgumentException` - when any of the arguments fail validation.
        `java.lang.NullPointerException` - when null specified as argument value.

Copyright © 2026 Open Microscopy Environment