Class MaskedDatasetCreator

java.lang.Object
gda.factory.FindableBase
gda.device.detector.nexusprocessor.MaskedDatasetCreator
All Implemented Interfaces:
DatasetCreator, Findable

public class MaskedDatasetCreator extends FindableBase implements DatasetCreator
Apply a mask to a dataset. The mask is defined by three additive specifications:
  • A list of individual pixel cooordinates
  • A high and low threshold - outliers are masked
  • A Dataset mask - this could be set manually or provided by an external source
  • The mask is cached and only regenerated when regenerateMask() is called (the previous dataset will be used).

    • Constructor Details

      • MaskedDatasetCreator

        public MaskedDatasetCreator()
    • Method Details

      • createDataSet

        public org.eclipse.january.dataset.Dataset createDataSet(org.eclipse.january.dataset.Dataset ds)
        Specified by:
        createDataSet in interface DatasetCreator
      • regenerateMask

        public void regenerateMask()
      • addMaskedPixel

        public void addMaskedPixel(int x, int y)
      • getMaskedPixels

        public List<javax.vecmath.Tuple2i> getMaskedPixels()
      • removeMaskedPixel

        public void removeMaskedPixel(int x, int y)
      • clearMaskedPixels

        public void clearMaskedPixels()
      • setExternalMask

        public void setExternalMask(org.eclipse.january.dataset.Dataset externalMask)
        If mask is set directly it is assumed to be using conventions of NXdetector
        Parameters:
        externalMask -
      • getMinThreshold

        public Number getMinThreshold()
      • setThreshold

        public void setThreshold(Number min, Number max)
      • setMinThreshold

        public void setMinThreshold(Number minThreshold)
      • getMaxThreshold

        public Number getMaxThreshold()
      • setMaxThreshold

        public void setMaxThreshold(Number maxThreshold)
      • isEnabled

        public boolean isEnabled()
        Description copied from interface: DatasetCreator
        Allows disabling and enabling the processing on the fly. If disabled, DatasetCreator.createDataSet(Dataset) will just return the supplied dataset.
        Specified by:
        isEnabled in interface DatasetCreator
      • setEnabled

        public void setEnabled(boolean enabled)
      • checkIfMasked

        public void checkIfMasked(int x, int y)