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
.boolean
applySettingsToImage(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
.boolean
applySettingsToPixels(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 allDatasets
of 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.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. Returnstrue
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 thePixels
- Returns:
- See above.
- Throws:
ValidationException
- if the image qualified byimageId
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 viagetRenderingSettings(long)
as it relies on certain objects being loaded. The rendering settings are saved upon completion.- Parameters:
def
- ARenderingDef
to reset. It is expected that def.pixels will be unloaded and that the actual linked Pixels set will be provided in thepixels
argument.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
- ARenderingDef
to reset. It is expected that def.pixels will be unloaded and that the actual linked Pixels set will be provided in thepixels
argument.pixels
- The Pixels set fordef
.- 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 theImage
.- Throws:
ValidationException
- if the image qualified byimageId
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 thePixels
.- Throws:
ValidationException
- if the Pixels qualified bypixelsId
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 theDataSet
.- Returns:
- A
Set
of image IDs that have had their rendering settings reset. - Throws:
ValidationException
- if the image qualified bydataSetId
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 illegaltype
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 illegaltype
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 illegaltype
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 asDataset
is to be copied to, all images within thatDataset
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 theFALSE
is a collection of images ID, the settings could not be applied to. - Throws:
ValidationException
- if an illegaltype
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 allDatasets
of 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
TRUE
is a collection of images ID, the settings were successfully applied to. The value of theFALSE
is a collection of images ID, the settings could not be applied to. - Throws:
ValidationException
- if the rendering settingsfrom
is unlocatable or the projectto
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 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
TRUE
is a collection of images ID, the settings were successfully applied to. The value of theFALSE
is a collection of images ID, the settings could not be applied to. - Throws:
ValidationException
- if the rendering settingsfrom
is unlocatable or the datasetto
is 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:
true
if the settings were successfully applied,false
otherwise.- Throws:
ValidationException
- if the rendering settingsfrom
is unlocatable or the imageto
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 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:
true
if the settings were successfully applied,false
otherwise.- Throws:
ValidationException
- if the rendering settingsfrom
is unlocatable or the imageto
is 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 settingsfrom
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 bydatasetId
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 illegaltype
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 theImage
.- Throws:
ValidationException
- if the image qualified byimageId
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 thePixels
set.- Throws:
ValidationException
- if the image qualified bypixelsId
is unlocatable.
-
-