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 givenDataset.booleanapplySettingsToImage(long from, long to)Applies rendering settings to a givenImage.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 givenImage.booleanapplySettingsToPixels(long from, long to)Applies rendering settings to a givenPixels.java.util.Map<java.lang.Boolean,java.util.List<java.lang.Long>>applySettingsToProject(long from, long to)Applies rendering settings to all images in allDatasetsof a givenProject.<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.RenderingDefcreateNewRenderingDef(ome.model.core.Pixels pixels)Creates a new rendering definition object along with its sub-objects.ome.model.display.RenderingDefgetRenderingSettings(long pixelsId)Returns the default rendering settings for a given pixels for the current user.voidresetDefaults(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).voidresetDefaultsForPixels(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.voidresetDefaultsInImage(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.RenderingDefresetDefaultsNoSave(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.booleansanityCheckPixels(ome.model.core.Pixels pFrom, ome.model.core.Pixels pTo)Checks if the specified sets of pixels are compatible.voidsetOriginalSettingsForPixels(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.voidsetOriginalSettingsInImage(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. Returnstrueif the pixels set is valid,falseotherwise.- 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 thePixels- Returns:
- See above.
- Throws:
ValidationException- if the image qualified byimageIdis 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
Pixelshas 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 viagetRenderingSettings(long)as it relies on certain objects being loaded. The rendering settings are saved upon completion.- Parameters:
def- ARenderingDefto reset. It is expected that def.pixels will be unloaded and that the actual linked Pixels set will be provided in thepixelsargument.pixels- The Pixels set fordef.
-
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 viagetRenderingSettings(long)as it relies on certain objects being loaded. The rendering settings are not saved.- Parameters:
def- ARenderingDefto reset. It is expected that def.pixels will be unloaded and that the actual linked Pixels set will be provided in thepixelsargument.pixels- The Pixels set fordef.- Returns:
defwith 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 theImage.- Throws:
ValidationException- if the image qualified byimageIdis 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 thePixels.- Throws:
ValidationException- if the Pixels qualified bypixelsIdis 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 theDataSet.- Returns:
- A
Setof image IDs that have had their rendering settings reset. - Throws:
ValidationException- if the image qualified bydataSetIdis 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:ProjectDatasetImagePlatePixels
- Parameters:
type- The type of nodes to handle.nodeIds- Ids of the node type.- Returns:
- A
Setof image IDs that have had their rendering settings reset. - Throws:
ValidationException- if an illegaltypeis 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:ProjectDatasetImagePlatePixels
- Parameters:
type- The type of nodes to handle.nodeIds- Ids of the node type.- Returns:
- A
Setof image IDs that have had their rendering settings reset. - Throws:
ValidationException- if an illegaltypeis 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:ProjectDatasetImagePlatePixels
- Parameters:
type- The type of nodes to handle.nodeIds- Ids of the node type.- Returns:
- A
Setof image IDs that have had their rendering settings reset. - Throws:
ValidationException- if an illegaltypeis 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 asDatasetis to be copied to, all images within thatDatasetwill have the rendering settings applied. Supported container types are:ProjectDatasetImagePlateScreenPixels
- 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
TRUEis a collection of images ID, the settings were successfully applied to. The value of theFALSEis a collection of images ID, the settings could not be applied to. - Throws:
ValidationException- if an illegaltypeis 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 allDatasetsof a givenProject.- 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
TRUEis a collection of images ID, the settings were successfully applied to. The value of theFALSEis a collection of images ID, the settings could not be applied to. - Throws:
ValidationException- if the rendering settingsfromis unlocatable or the projecttois 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 givenDataset.- 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
TRUEis a collection of images ID, the settings were successfully applied to. The value of theFALSEis a collection of images ID, the settings could not be applied to. - Throws:
ValidationException- if the rendering settingsfromis unlocatable or the datasettois unlocatable.
-
applySettingsToImage
boolean applySettingsToImage(long from, long to)Applies rendering settings to a givenImage.- 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:
trueif the settings were successfully applied,falseotherwise.- Throws:
ValidationException- if the rendering settingsfromis unlocatable or the imagetois 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 givenImage.- 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:
trueif the settings were successfully applied,falseotherwise.- Throws:
ValidationException- if the rendering settingsfromis unlocatable or the imagetois unlocatable.
-
applySettingsToPixels
boolean applySettingsToPixels(long from, long to)Applies rendering settings to a givenPixels.- 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 settingsfromis unlocatable or the pixelstois 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
Setof image IDs that have had their rendering settings reset. - Throws:
ValidationException- if the image qualified bydatasetIdis 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:ProjectDatasetImagePlatePixels
- Parameters:
type- The type of nodes to handle.nodeIds- Ids of the node type.- Returns:
- A
Setof image IDs that have had their rendering settings reset. - Throws:
ValidationException- if an illegaltypeis 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 theImage.- Throws:
ValidationException- if the image qualified byimageIdis unlocatable.
-
setOriginalSettingsForPixels
void setOriginalSettingsForPixels(long pixelsId)
Resets an Pixels' default rendering settings back to channel global minimum and maximum.- Parameters:
pixelsId- The Id of thePixelsset.- Throws:
ValidationException- if the image qualified bypixelsIdis unlocatable.
-
-