Using the utility
Image Compliance provides a utility for migrating TIFF Validation rules defined in a TIFF rules file to a database rule table.
A TIFF rules file specifies which tests are performed during TIFF Validation. It is an XML format defined in TIFF Validation.
The migration utility reads the TIFF rules file and generates a DDL file that is imported to the database
by the database administrator. Once it is imported, the DDL file creates a rule set object containing the TIFF
rules defined in the TIFF rules file. The program is located in the
install_directory\check\v409\ImageCompliance\cmd directory. The
migration utility is:
- For the Windows operating system: MigrTiffRules.bat
- For AIX®: MigrTiffRules.sh
- For Linux®: MigrTiffRules.sh
MigrTiffRules xxx.xml suspectY suspectNwhere, - xxx.xml
- Is the TIFF rules file name
- suspectY
- Is the error code that is used by rules defined with suspect set to yes in the rules file
- suspectN
- Is the error code that is used by rules defined with suspect set to no in the rules file
The output DDL file has the same name as the input TIFF rules file, except the file extension is different.
An example DDL file is shown here:
SET SCHEMA FTM;
INSERT INTO IMAGE_VALIDATION_RULE_SET (VALIDATION_RULE_SET_NAME,
DESCRIPTION, LAST_UPDATED) VALUES ('RuleSetName', '', current
timestamp);
INSERT INTO TIFF_IQA_RULES (RULE_TEST_TYPE, TEST_REQUIRED,
RULES_SET_NAME, ERROR_CODE, TIFF_TAG_NUM, TEST_ID, TEST_VALUE,
IMAGE_VIEW_TYPE) VALUES (2, 'Y', 'RuleSetName', '112', 0, 201, '07', 0);
INSERT INTO TIFF_IQA_RULES (RULE_TEST_TYPE, TEST_REQUIRED,
RULES_SET_NAME, TEST_ID, ERROR_CODE, TIFF_TAG_NUM, TEST_VALUE,
IMAGE_VIEW_TYPE) VALUES (1, 'Y', 'RuleSetName', 101, '1234', 0, 'Y', 0);
COMMIT;The rule set name is the TIFF rules file name without the XML extension. It can be truncated to the first 15 characters to meet rule set name length restrictions.
Rules can be different for each image view. A TIFF rule defined in the TIFF rules file is migrated to for rule records in a TIFF rule table (one rule record for each view).
Table 1 shows examples of how a test in the TIFF rules file
maps to a test record in the database.
| Example | Test Name | Tag Number | Test value | Error Code |
|---|---|---|---|---|
|
TIFF Header Required | 0 | null | suspectY |
|
TIFF Header Optional | 0 | null | suspectN |
|
Byte Order_Little | 0 | null | suspectY |
|
Byte Order_Big | 0 | null | suspectN |
|
IFD Valid | 0 | null | suspectY |
|
Tag Order Ascending | 0 | null | suspectY |
|
Single Page | 0 | null | suspectY |
|
Pointers Valid | 0 | null | suspectY |
|
Decompress G4 Only | 0 | null | suspectY |
|
Decompress Len G4 Only | 0 | null | suspectY |
|
EOFB G4 Only | 0 | null | suspectY |
|
Extra Pad G4 Only | 0 | 0 | suspectY |
|
Mandatory | 257 | null | suspectY |
|
Not Equal (Value) | 257 | 0 | suspectN |
|
IFD Entry Field Count | 273 | 1 | suspectY |
|
IFD Entry Field Type | 273 | 3 4 | suspectY |
|
Equal (Value) | 283 | 200 240 | suspectY |
|
Equal (Tag Ref) | 283 | 282 | suspectY |
|
Not Equal (Tag Ref) | 283 | 281 | suspectN |