Skip to content

Commit

Permalink
Merge pull request #33 from JaneliaSciComp/main
Browse files Browse the repository at this point in the history
updates to Axis object
  • Loading branch information
bogovicj authored Jan 21, 2025
2 parents f975a00 + 64b710b commit e403f7a
Showing 1 changed file with 36 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ public class Axis {

protected boolean discrete;

/**
* see https://ngff.openmicroscopy.org/0.4/index.html#axes-md
*
* @param name must be unique across all name fields (typical: t,c,z,y,x)
* @param type Axis.SPACE, Axis.CHANNEL, Axis.TIME, Axis.DISPLACEMENT or Axis.ARRAY (optional)
* @param unit must be chosen from a list of allowed units, can otherwise lead to issues down the road, e.g. in Neuroglancer (optional)
* @param discrete not part of the spec yet, DISCRETE means don't interpolate between values (optional)
*/
public Axis( final String type, final String name, final String unit, final boolean discrete )
{
this.type = type;
Expand All @@ -24,6 +32,34 @@ public Axis( final String type, final String name, final String unit, final bool
this.discrete = discrete;
}

/**
* see https://ngff.openmicroscopy.org/0.4/index.html#axes-md
*
* @param name must be unique across all name fields (typical: t,c,z,y,x)
*/
public Axis( final String name )
{
this( null, name, null, false );
}

/**
* see https://ngff.openmicroscopy.org/0.4/index.html#axes-md
*
* @param name must be unique across all name fields (typical: t,c,z,y,x)
* @param type Axis.SPACE, Axis.CHANNEL, Axis.TIME, Axis.DISPLACEMENT or Axis.ARRAY (optional)
*/
public Axis( final String type, final String name )
{
this( type, name, null, false );
}

/**
* see https://ngff.openmicroscopy.org/0.4/index.html#axes-md
*
* @param name must be unique across all name fields (typical: t,c,z,y,x)
* @param type Axis.SPACE, Axis.CHANNEL, Axis.TIME, Axis.DISPLACEMENT or Axis.ARRAY (optional)
* @param unit must be chosen from a list of allowed units, can otherwise lead to issues down the road, e.g. in Neuroglancer (optional)
*/
public Axis( final String type, final String name, final String unit )
{
this( type, name, unit, false );
Expand Down

0 comments on commit e403f7a

Please sign in to comment.