Non-image data in FlashPix files are treated as comments by LEADTOOLS. They are one contiguous block of memory, hereafter referred to as "Comments Block". Within the Comments Block are one or more individual comments. An individual comment will hereafter be referred to as "Comment". In FlashPix files a Comment consists of a "Comment header" and "Comment data". Further information on individual Comments may be found in FlashPixComments.
Reading the Comments stored in the Comments Block requires the use of the following structure.
The FILECOMMENTS structure, which is necessary for the L_ReadFileCommentExt function, provides information about and access to the FlashPix comments.
typedef struct _FILECOMMENTS
} FILECOMMENTS, * LPFILECOMMENTS;
Number of comments. Must be CMNT_LAST + 1.
Pointer to an array of pointers. Each pointer within the array points to a single comment.
Pointer to an array of sizes. Each member of the array indicates the length of the corresponding comment.
Presently, this structure is used with L_ReadFileCommentExt.
The FILECOMMENTS structure must be filled before using L_ReadFileCommentExt:
L_UCHAR *pPointer[CMNT_LAST + 1];
L_UINT Size[CMNT_LAST + 1];
FileComments.count = CMNT_LAST + 1;
FileComments.pointer = pPointer;
FileComments.size = Size;
For a full example showing the use of this structure when reading Comments, refer to L_ReadFileCommentExt.
In the above structure, count indicates the number of individual Comments which can be stored in the Comments Block. Generally, the memory allocated for a Comments Block is large enough to store all FlashPix Comments, even if not all FlashPix Comments may actually be stored. **Pointer points to an array of pointers. Each pointer within the array points to the beginning of a Comment. Size points to the beginning of an array of integers. Each integer indicates the length of the corresponding Comment. The graph below shows the structure of FILECOMMENTS and its relationship to Comments Block, the array of pointers into Comments Block and the array of integers containing the lengths of the Comments in Comments Block. The following declarations pertain to the graph:
L_UCHAR *pPointerComments[CMNT_LAST + 1];
L_UINT LengthComments[CMNT_LAST + 1];
FileComments is an instance of FILECOMMENTS. The data member count is set to CMNT_LAST + 1 indicating that the Comments Block contains all the FlashPix Comments. pPointer points to the beginning of the array of pointers, pPointerComments. Size points to the beginning of the integer array LengthComments. In this graph you can see that the first pointer in pPointerComments points to the beginning of the first Comment in pTextToGet, the Comments Block. The first entry in LengthComments contains the length of this Comment. You can also see that the first Comment consists of a Comment header and Comment data.
The second pointer in pPointerComments points to the second Comment in the Comments Block, adjacent to the first Comment. The second entry in LengthComments contains the data value 16, indicating that the second Comment is 16 bytes in length. Again, the second Comment consists of a Comment header and Comment data. This continues for each Comment in the Comment Block.
Medical Web Viewer .NET
.NET, Java, Android, and iOS/macOS Assemblies
C API/C++ Class Libraries