MemoryCache¶
-
MLModule
¶ genre Image
author MeVis Medical Solutions AG
package MeVisLab/Standard
dll MLMiscModules
definition MLMiscModules.def see also ImagePropertyConvert
,MLImageFormatFileCache
,BitImageArithmetic
,Scale
,MinMaxScan
keywords open
,input
,data
,load
,caching
,ram
,global
,buffer
Purpose¶
The module MemoryCache
is designed to hold a copy of the image at the modle input for a user controlled period of time in memory.
The data transport to attached modules is optimized for maximum performance. Another feature is that the module input can be disconnected after filling the cache with an image without losing the cache’s contents.
Details¶
Notes
- Using the
MemoryCache
module should be considered dangerous for applications if the size of cached images is not limited. For large files not fitting into the memory consider using theMLImageFormatFileCache
module as an alternative storing the file on disk. Especially in large applications theMemoryCache
module often causes trouble due to the large amount of locked memory.- For BitImages consider using the
BitImageArithmetic
modules which can cache BitImages. This could be useful especially for caching masked images.- The
MemoryCache
module seems to invite usage in loops, e.g iterative filtering, etc. This is not supported, since the output of theMemoryCache
is invalidated as soon as an update is performed, which is disastrous if this output is needed to compute the input. Do not use to implement loops (unless you are willing to use a secondMemoryCache
module to buffer the first one’s output). Use the ImageIterator modules instead.
Parameter Fields¶
Visible Fields¶
Valid¶
-
name:
valid
, type:
Bool
, persistent:
no
, deprecated name:
Valid
¶ Shows if the cache’s content is valid.
If the cache content is invalid, the module’s output image is undefined, otherwise a copy of the image at the module’s input is available.
Clear¶
-
name:
clear
, type:
Trigger
, deprecated name:
ClearCache
¶ If pressed, the cache is cleared and the output is invalidated.
Update¶
-
name:
update
, type:
Trigger
, deprecated name:
LoadCache
¶ If pressed, the complete data from the module’s input is copied into the memory cache and makes it available at the module’s output.
If the input is not valid while pressing this button, the cache is cleared and the module’s output becomes invalid.
Update Mode¶
-
name:
updateMode
, type:
Enum
, default:
AutoUpdate
, deprecated name:
AutoLoadCache
¶ Defines the update mode of this module.
Values:
Title | Name | Deprecated Name | Description |
---|---|---|---|
Off | Off | FALSE | Nothing happens if the input image changes. |
Auto Update | AutoUpdate | TRUE | The input image is cached as it is changed. |
Auto Clear | AutoClear | The cache is cleared if the input image changes. |