Class AbstractDenoiser<T extends DataContainer>

    • Field Detail

      • m_RecordRegions

        protected boolean m_RecordRegions
        whether to record elution regions as well.
      • m_Regions

        protected List<T extends DataContainer> m_Regions
        the collected elution regions.
    • Constructor Detail

      • AbstractDenoiser

        public AbstractDenoiser()
    • Method Detail

      • reset

        protected void reset()
        Resets the noise algorithm. Derived classes must call this method in set-methods of parameters to assure the invalidation of previously generated data.
        Overrides:
        reset in class AbstractOptionHandler
      • cleanUp

        public void cleanUp()
        Cleans up data structures, frees up memory. Sets the input data to null.
        Specified by:
        cleanUp in interface CleanUpHandler
      • setRecordRegions

        public void setRecordRegions​(boolean value)
        Sets whether the noisy regions are recorded as well.
        Specified by:
        setRecordRegions in interface RegionRecorder<T extends DataContainer>
        Parameters:
        value - if true the regions will be recorded
        See Also:
        getRegions()
      • recordRegionsTipText

        public String recordRegionsTipText()
        Returns the tip text for this property.
        Specified by:
        recordRegionsTipText in interface RegionRecorder<T extends DataContainer>
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • checkData

        protected void checkData​(T data)
        The default implementation only checks whether there is any data set.
        Parameters:
        data - the data to process
      • processData

        protected abstract T processData​(T data)
        Performs the actual denoising.
        Parameters:
        data - the data to process
        Returns:
        the denoised data
      • postprocessData

        protected T postprocessData​(T original,
                                    T denoised)
        Post-processes the data.

        Default implementation only returns the denoised data as it is.
        Parameters:
        original - the original input data
        denoised - the denoised data
        Returns:
        the postprocessed data
      • denoise

        public T denoise​(T data)
        Returns the denoised data.
        Parameters:
        data - the data to denoise
        Returns:
        the denoised data
      • toStringRegions

        public String toStringRegions()
        Turns the recorded regions as a string.
        Returns:
        the regions
      • compareTo

        public int compareTo​(Object o)
        Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

        Only compares the commandlines of the two objects.
        Specified by:
        compareTo in interface Comparable<T extends DataContainer>
        Parameters:
        o - the object to be compared.
        Returns:
        a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
        Throws:
        ClassCastException - if the specified object's type prevents it from being compared to this object.
      • equals

        public boolean equals​(Object o)
        Returns whether the two objects are the same.

        Only compares the commandlines of the two objects.
        Overrides:
        equals in class Object
        Parameters:
        o - the object to be compared
        Returns:
        true if the object is the same as this one
      • shallowCopy

        public AbstractDenoiser shallowCopy​(boolean expand)
        Returns a shallow copy of itself, i.e., based on the commandline options.
        Specified by:
        shallowCopy in interface ShallowCopySupporter<T extends DataContainer>
        Parameters:
        expand - whether to expand variables to their current values
        Returns:
        the shallow copy
      • getDenoisers

        public static String[] getDenoisers()
        Returns a list with classnames of denoiser algorithms.
        Returns:
        the denoiser algorithm classnames
      • forName

        public static AbstractDenoiser forName​(String classname,
                                               String[] options)
        Instantiates the denoiser algorithm with the given options.
        Parameters:
        classname - the classname of the denoiser algorithm to instantiate
        options - the options for the denoiser algorithm
        Returns:
        the instantiated denoiser algorithm or null if an error occurred
      • forCommandLine

        public static AbstractDenoiser forCommandLine​(String cmdline)
        Instantiates the denoiser algorithm from the given commandline (i.e., classname and optional options).
        Parameters:
        cmdline - the classname (and optional options) of the denoiser algorithm to instantiate
        Returns:
        the instantiated denoiser algorithm or null if an error occurred