Class ConvertToFactory

Object
ConvertToFactory

public class ConvertToFactory extends Object
Creates a ConvertTo to match the desired voxel-type.
Author:
Owen Feehan
  • Method Details

    • create

      public static ConvertTo<?> create(loci.formats.IFormatReader reader, VoxelDataType targetDataType, int effectiveBitsPerPixel) throws CreateException
      Creates a ConvertTo to match the desired voxel-type.

      It should match both the desired target type, and the voxel-type present in the input reader.

      Parameters:
      reader - a reader whose current state contains information about the file being read.
      targetDataType - the data-type voxels should be converted to.
      effectiveBitsPerPixel - how many bits are used (from the total available amount) per pixel (voxel).
      Returns:
      a newly created ConvertTo as matches the above.
      Throws:
      CreateException - if no ConvertTo can be created from the source type to desired target type.