Package ome.api

Interface IRenderingSettings

  • All Superinterfaces:
    ServiceInterface

    public interface IRenderingSettings
    extends ServiceInterface
    Provides method to apply rendering settings to a collection of images. All methods will receive the id of the pixels set to copy the rendering settings from.
    Since:
    3.0
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.Map<java.lang.Boolean,​java.util.List<java.lang.Long>> applySettingsToDataset​(long from, long to)
      Applies rendering settings to all images in a given Dataset.
      boolean applySettingsToImage​(long from, long to)
      Applies rendering settings to a given Image.
      java.util.Map<java.lang.Boolean,​java.util.List<java.lang.Long>> applySettingsToImages​(long from, java.util.List<java.lang.Long> to)
      Applies rendering settings to a given Image.
      boolean applySettingsToPixels​(long from, long to)
      Applies rendering settings to a given Pixels.
      java.util.Map<java.lang.Boolean,​java.util.List<java.lang.Long>> applySettingsToProject​(long from, long to)
      Applies rendering settings to all images in all Datasets of a given Project.
      <T extends ome.model.IObject>
      java.util.Map<java.lang.Boolean,​java.util.List<java.lang.Long>>
      applySettingsToSet​(long from, java.lang.Class<T> type, java.util.Set<java.lang.Long> nodeIds)
      Applies rendering settings to one or many containers.
      ome.model.display.RenderingDef createNewRenderingDef​(ome.model.core.Pixels pixels)
      Creates a new rendering definition object along with its sub-objects.
      ome.model.display.RenderingDef getRenderingSettings​(long pixelsId)
      Returns the default rendering settings for a given pixels for the current user.
      void resetDefaults​(ome.model.display.RenderingDef def, ome.model.core.Pixels pixels)
      Resets the given rendering settings to those that are specified by the rendering engine intelligent pretty good image (PG) logic for the pixels set linked to that set of rendering settings.
      <T extends ome.model.IObject>
      java.util.Set<java.lang.Long>
      resetDefaultsByOwnerInSet​(java.lang.Class<T> type, java.util.Set<java.lang.Long> nodeIds)
      Resets the rendering settings of a given group of containers based on the owner's (essentially a copy).
      void resetDefaultsForPixels​(long pixelsId)
      Resets a Pixels' default rendering settings back to those that are specified by the rendering engine intelligent pretty good image (PG) logic.
      java.util.Set<java.lang.Long> resetDefaultsInDataset​(long dataSetId)
      Resets a dataset's rendering settings back to those that are specified by the rendering engine intelligent pretty good image (PG) logic.
      void resetDefaultsInImage​(long imageId)
      Resets an image's default rendering settings back to those that are specified by the rendering engine intelligent pretty good image (PG) logic.
      <T extends ome.model.IObject>
      java.util.Set<java.lang.Long>
      resetDefaultsInSet​(java.lang.Class<T> type, java.util.Set<java.lang.Long> nodeIds)
      Resets a rendering settings back to one or many containers that are specified by the rendering engine intelligent pretty good image (PG) logic.
      ome.model.display.RenderingDef resetDefaultsNoSave​(ome.model.display.RenderingDef def, ome.model.core.Pixels pixels)
      Resets the given rendering settings to those that are specified by the rendering engine intelligent pretty good image (PG) logic for the pixels set linked to that set of rendering settings.
      <T extends ome.model.IObject>
      java.util.Set<java.lang.Long>
      resetMinMaxInSet​(java.lang.Class<T> type, java.util.Set<java.lang.Long> nodeIds)
      Resets a the channel windows for one or many containers back to their global minimum and global maximum for the channel.
      boolean sanityCheckPixels​(ome.model.core.Pixels pFrom, ome.model.core.Pixels pTo)
      Checks if the specified sets of pixels are compatible.
      void setOriginalSettingsForPixels​(long pixelsId)
      Resets an Pixels' default rendering settings back to channel global minimum and maximum.
      java.util.Set<java.lang.Long> setOriginalSettingsInDataset​(long datasetId)
      Resets a dataset's rendering settings back to channel global minimum and maximum.
      void setOriginalSettingsInImage​(long imageId)
      Resets an image's default rendering settings back to channel global minimum and maximum.
      <T extends ome.model.IObject>
      java.util.Set<java.lang.Long>
      setOriginalSettingsInSet​(java.lang.Class<T> type, java.util.Set<java.lang.Long> nodeIds)
      Resets a rendering settings back to channel global minimum and maximum for the specified containers.
    • Method Detail

      • sanityCheckPixels

        boolean sanityCheckPixels​(ome.model.core.Pixels pFrom,
                                  ome.model.core.Pixels pTo)
        Checks if the specified sets of pixels are compatible. Returns true if the pixels set is valid, false otherwise.
        Parameters:
        pFrom - The pixels set to copy the settings from.
        pTo - The pixels set to copy the settings to.
        Returns:
        See above.
      • getRenderingSettings

        ome.model.display.RenderingDef getRenderingSettings​(long pixelsId)
        Returns the default rendering settings for a given pixels for the current user.
        Parameters:
        pixelsId - The Id of the Pixels
        Returns:
        See above.
        Throws:
        ValidationException - if the image qualified by imageId is unlocatable.
      • createNewRenderingDef

        ome.model.display.RenderingDef createNewRenderingDef​(ome.model.core.Pixels pixels)
        Creates a new rendering definition object along with its sub-objects.
        Parameters:
        pixels - The Pixels set to link to the rendering definition.
        Returns:
        A new, blank rendering definition and sub-objects. NOTE: the linked Pixels has been unloaded.
      • resetDefaults

        void resetDefaults​(ome.model.display.RenderingDef def,
                           ome.model.core.Pixels pixels)
        Resets the given rendering settings to those that are specified by the rendering engine intelligent pretty good image (PG) logic for the pixels set linked to that set of rendering settings. NOTE: This method should only be used to reset a rendering definition that has been retrieved via getRenderingSettings(long) as it relies on certain objects being loaded. The rendering settings are saved upon completion.
        Parameters:
        def - A RenderingDef to reset. It is expected that def.pixels will be unloaded and that the actual linked Pixels set will be provided in the pixels argument.
        pixels - The Pixels set for def.
      • resetDefaultsNoSave

        ome.model.display.RenderingDef resetDefaultsNoSave​(ome.model.display.RenderingDef def,
                                                           ome.model.core.Pixels pixels)
        Resets the given rendering settings to those that are specified by the rendering engine intelligent pretty good image (PG) logic for the pixels set linked to that set of rendering settings. NOTE: This method should only be used to reset a rendering definition that has been retrieved via getRenderingSettings(long) as it relies on certain objects being loaded. The rendering settings are not saved.
        Parameters:
        def - A RenderingDef to reset. It is expected that def.pixels will be unloaded and that the actual linked Pixels set will be provided in the pixels argument.
        pixels - The Pixels set for def.
        Returns:
        def with the rendering settings reset.
      • resetDefaultsInImage

        void resetDefaultsInImage​(long imageId)
        Resets an image's default rendering settings back to those that are specified by the rendering engine intelligent pretty good image (PG) logic.
        Parameters:
        imageId - The Id of the Image.
        Throws:
        ValidationException - if the image qualified by imageId is unlocatable.
      • resetDefaultsForPixels

        void resetDefaultsForPixels​(long pixelsId)
        Resets a Pixels' default rendering settings back to those that are specified by the rendering engine intelligent pretty good image (PG) logic.
        Parameters:
        pixelsId - The Id of the Pixels.
        Throws:
        ValidationException - if the Pixels qualified by pixelsId is unlocatable.
      • resetDefaultsInDataset

        java.util.Set<java.lang.Long> resetDefaultsInDataset​(long dataSetId)
        Resets a dataset's rendering settings back to those that are specified by the rendering engine intelligent pretty good image (PG) logic.
        Parameters:
        dataSetId - The Id of the DataSet.
        Returns:
        A Set of image IDs that have had their rendering settings reset.
        Throws:
        ValidationException - if the image qualified by dataSetId is unlocatable.
      • resetDefaultsInSet

        <T extends ome.model.IObject> java.util.Set<java.lang.Long> resetDefaultsInSet​(java.lang.Class<T> type,
                                                                                       java.util.Set<java.lang.Long> nodeIds)
        Resets a rendering settings back to one or many containers that are specified by the rendering engine intelligent pretty good image (PG) logic. Supported container types are:
        • Project
        • Dataset
        • Image
        • Plate
        • Pixels
        Parameters:
        type - The type of nodes to handle.
        nodeIds - Ids of the node type.
        Returns:
        A Set of image IDs that have had their rendering settings reset.
        Throws:
        ValidationException - if an illegal type is used.
      • resetDefaultsByOwnerInSet

        <T extends ome.model.IObject> java.util.Set<java.lang.Long> resetDefaultsByOwnerInSet​(java.lang.Class<T> type,
                                                                                              java.util.Set<java.lang.Long> nodeIds)
        Resets the rendering settings of a given group of containers based on the owner's (essentially a copy). Supported container types are:
        • Project
        • Dataset
        • Image
        • Plate
        • Pixels
        Parameters:
        type - The type of nodes to handle.
        nodeIds - Ids of the node type.
        Returns:
        A Set of image IDs that have had their rendering settings reset.
        Throws:
        ValidationException - if an illegal type is used.
      • resetMinMaxInSet

        <T extends ome.model.IObject> java.util.Set<java.lang.Long> resetMinMaxInSet​(java.lang.Class<T> type,
                                                                                     java.util.Set<java.lang.Long> nodeIds)
        Resets a the channel windows for one or many containers back to their global minimum and global maximum for the channel. Supported container types are:
        • Project
        • Dataset
        • Image
        • Plate
        • Pixels
        Parameters:
        type - The type of nodes to handle.
        nodeIds - Ids of the node type.
        Returns:
        A Set of image IDs that have had their rendering settings reset.
        Throws:
        ValidationException - if an illegal type is used.
      • applySettingsToSet

        <T extends ome.model.IObject> java.util.Map<java.lang.Boolean,​java.util.List<java.lang.Long>> applySettingsToSet​(long from,
                                                                                                                               java.lang.Class<T> type,
                                                                                                                               java.util.Set<java.lang.Long> nodeIds)
        Applies rendering settings to one or many containers. If a container such as Dataset is to be copied to, all images within that Dataset will have the rendering settings applied. Supported container types are:
        • Project
        • Dataset
        • Image
        • Plate
        • Screen
        • Pixels
        Type Parameters:
        T - The type of object to copy to.
        Parameters:
        from - The Id of the pixels set to copy the rendering settings from.
        type - The type of nodes to handle.
        nodeIds - Ids of the node type.
        Returns:
        A map with two boolean keys. The value of the TRUE is a collection of images ID, the settings were successfully applied to. The value of the FALSE is a collection of images ID, the settings could not be applied to.
        Throws:
        ValidationException - if an illegal type is used.
      • applySettingsToProject

        java.util.Map<java.lang.Boolean,​java.util.List<java.lang.Long>> applySettingsToProject​(long from,
                                                                                                     long to)
        Applies rendering settings to all images in all Datasets of a given Project.
        Parameters:
        from - The Id of the pixels set to copy the rendering settings from.
        to - The Id of the project container to apply settings to.
        Returns:
        A map with two boolean keys. The value of the TRUE is a collection of images ID, the settings were successfully applied to. The value of the FALSE is a collection of images ID, the settings could not be applied to.
        Throws:
        ValidationException - if the rendering settings from is unlocatable or the project to is unlocatable.
      • applySettingsToDataset

        java.util.Map<java.lang.Boolean,​java.util.List<java.lang.Long>> applySettingsToDataset​(long from,
                                                                                                     long to)
        Applies rendering settings to all images in a given Dataset.
        Parameters:
        from - The Id of the pixels set to copy the rendering settings from.
        to - The Id of the dataset container to apply settings to.
        Returns:
        A map with two boolean keys. The value of the TRUE is a collection of images ID, the settings were successfully applied to. The value of the FALSE is a collection of images ID, the settings could not be applied to.
        Throws:
        ValidationException - if the rendering settings from is unlocatable or the dataset to is unlocatable.
      • applySettingsToImage

        boolean applySettingsToImage​(long from,
                                     long to)
        Applies rendering settings to a given Image.
        Parameters:
        from - The Id of the pixels set to copy the rendering settings from.
        to - The Id of the image container to apply settings to.
        Returns:
        true if the settings were successfully applied, false otherwise.
        Throws:
        ValidationException - if the rendering settings from is unlocatable or the image to is unlocatable.
      • applySettingsToImages

        java.util.Map<java.lang.Boolean,​java.util.List<java.lang.Long>> applySettingsToImages​(long from,
                                                                                                    java.util.List<java.lang.Long> to)
        Applies rendering settings to a given Image.
        Parameters:
        from - The Id of the pixels set to copy the rendering settings from.
        to - The Id of the image container to apply settings to.
        Returns:
        true if the settings were successfully applied, false otherwise.
        Throws:
        ValidationException - if the rendering settings from is unlocatable or the image to is unlocatable.
      • applySettingsToPixels

        boolean applySettingsToPixels​(long from,
                                      long to)
        Applies rendering settings to a given Pixels.
        Parameters:
        from - The Id of the pixels set to copy the rendering settings from.
        to - The Id of the pixels container to apply settings to.
        Returns:
        See above.
        Throws:
        ValidationException - if the rendering settings from is unlocatable or the pixelsto is unlocatable.
      • setOriginalSettingsInDataset

        java.util.Set<java.lang.Long> setOriginalSettingsInDataset​(long datasetId)
        Resets a dataset's rendering settings back to channel global minimum and maximum.
        Parameters:
        datasetId - The id of the dataset to handle.
        Returns:
        A Set of image IDs that have had their rendering settings reset.
        Throws:
        ValidationException - if the image qualified by datasetId is unlocatable.
      • setOriginalSettingsInSet

        <T extends ome.model.IObject> java.util.Set<java.lang.Long> setOriginalSettingsInSet​(java.lang.Class<T> type,
                                                                                             java.util.Set<java.lang.Long> nodeIds)
        Resets a rendering settings back to channel global minimum and maximum for the specified containers. Supported container types are:
        • Project
        • Dataset
        • Image
        • Plate
        • Pixels
        Parameters:
        type - The type of nodes to handle.
        nodeIds - Ids of the node type.
        Returns:
        A Set of image IDs that have had their rendering settings reset.
        Throws:
        ValidationException - if an illegal type is used.
      • setOriginalSettingsInImage

        void setOriginalSettingsInImage​(long imageId)
        Resets an image's default rendering settings back to channel global minimum and maximum.
        Parameters:
        imageId - The Id of the Image.
        Throws:
        ValidationException - if the image qualified by imageId is unlocatable.
      • setOriginalSettingsForPixels

        void setOriginalSettingsForPixels​(long pixelsId)
        Resets an Pixels' default rendering settings back to channel global minimum and maximum.
        Parameters:
        pixelsId - The Id of the Pixels set.
        Throws:
        ValidationException - if the image qualified by pixelsId is unlocatable.