Function: generateFrameImageId()
generateFrameImageId(
baseImageId,frameNumber):string
Generates frame-specific imageIds for a multiframe image. Replaces the frame number in the imageId with the specified frame number (1-based).
Parameters
• baseImageId: string
The base imageId that must contain a "/frames/" pattern followed by a digit. Expected format: e.g., "wadouri:http://example.com/image/frames/1" or "wadors:/path/to/image.dcm/frames/1". The pattern "/frames/\d+" will be replaced with "/frames/" + frameNumber.
• frameNumber: number
The frame number to use (1-based)
Returns
string
The imageId with the frame number replaced
Throws
If baseImageId does not contain the required "/frames/" pattern, throws an error with a clear message indicating the expected format.