ImageCacheForNetworkLoops¶
- MacroModule¶
 genre
author
package
definition
see also
ImageCache,PageCache,ImageFileCache,MLImageFormatFileCache,MemoryCachekeywords
File,Image,Page,Memory,Cache,Buffer,Loop,Iterati,Accumul
Purpose¶
The ImageCacheForNetworkLoops module works exactly like the ImageCache module except that it keeps its output valid during Update from Loop, supporting network loops (i. e. the output being connected to its input, see example network).
The loop support comes at a price, namely additional memory/time consumption (internally, a temporary secondary cache of the same type is used), and no auto-update/auto-clear support.
Thus:
Use this module (ImageCacheForNetworkLoops) if you have a loop in your network
Use
ImageCachein all other cases
Usage¶
Select any caching mode via the field In Mode, then initialize the cache via the inInitializationImage input. Then connect the output to your image processing pipeline that you would like to process iteratively, and then to inLoopImage. Press Update from Loop for each processing step.
Windows¶
Default Panel¶
Input Fields¶
inInitializationImage¶
- name: inInitializationImage, type: Image¶
 Input used for initialization of the cache.
inLoopImage¶
- name: inLoopImage, type: Image¶
 Input used for iterative updates of the cache.
Output Fields¶
outImage¶
- name: outImage, type: Image, deprecated name: output0¶
 Output image, representing the cached image.
Parameter Fields¶
Field Index¶
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
Visible Fields¶
(Re-)Initialize¶
- name: initialize, type: Trigger¶
 Initializes the cache from the left input (
inInitializationImage). If successful, the cached image will be made available at the output. After the initialization attempt (no matter if successful or not), the field[]will be triggered.
Update from Loop¶
- name: update, type: Trigger¶
 Initiates update of the cache from the right input (
inLoopImage). During the update, the output image atoutImagewill remain valid, so that it is allowed and possible to iteratively change the image in an image processing loop as in the example network. If the update is successful, the cached image will be made available at the output. After an update (no matter if successful or not), the field[]will be triggered.
Clear¶
- name: clear, type: Trigger¶
 Clears all output field values to a clean initial state.
In Mode¶
- name: inMode, type: Enum, default: PageCache¶
 Caching mode
Values:
Title  | 
Name  | 
Description  | 
|---|---|---|
Memory Caching (Pages)  | 
PageCache  | 
Cache the input image in memory internally using the   | 
Memory Caching (Memory Image)  | 
MemoryCache  | 
Cache the input image in memory internally using the   | 
File Cache (MLImageFormat LZ4)  | 
FileCache  | 
Cache the input image in memory internally using the   | 
Use Automatic Filename¶
- name: inFileCache_useAutoFilename, type: Bool, default: TRUE¶
 If enabled, no cache file prefix or name has to be provided, the module automatically selects a non-existing one in your temp folder.
Custom Cache File Name¶
- name: inFileCache_customFilenameBase, type: String, deprecated name: inFileCache\_filenameBase¶
 FileCache mode only: Prefix (path + filename prefix) for the cache file (used if
Use Automatic Filenameis off). If you provide a path without any file prefix, you have to append a path separator (“/”) at the end to indicate that.
Preserve Cache Files¶
Cached Image Extent¶
- name: outCachedImageExtent, type: Vector6, default: 0 0 0 0 0 0¶
 Displays the image extent of the currently cached image.
Cached Image Type¶
- name: outCachedImageType, type: String, default: unknown¶
 Displays the voxel type of the currently cached image.
Cached Image File:¶
- name: outFileCache_cachedImageFilename, type: String, default: n/a¶
 File name of the cached image if in FileCache mode. If invalid, the value is “n/a”.
Status Code¶
- name: statusCode, type: Enum, persistent: no¶
 Reflects module’s status (successful or failed computations) as one of some predefined enumeration values.
Values:
Title  | 
Name  | 
|---|---|
Ok  | 
Ok  | 
Busy  | 
Busy  | 
Invalid input image  | 
InvalidInputObject  | 
Invalid input parameter  | 
InvalidInputParameter  | 
Internal error  | 
InternalError  | 
Last Update Time¶
- name: updateTime_s, type: Double, persistent: no¶
 Displays the time required for caching the input image (in seconds).
[]¶
- name: updateDone, type: Trigger, persistent: no¶
 Notifies that an initialization or update was performed (check status interface fields to identify success or failure).
Status Message¶
- name: statusMessage, type: String, persistent: no¶
 Gives additional, detailed information about status code as human-readable message.
Has Valid Output¶
- name: hasValidOutput, type: Bool, persistent: no¶
 Indicates validity of output field values (success of computation).