Falcon64
V10R1
|
Class to handle keeping track of images that are extracted from source files and copied to the batch image collection folder. More...
#include <ImageLoader.h>
Public Member Functions | |
CImageLoader (CWnd *pGenericModelessDialog) | |
~CImageLoader () | |
void | AttachDialog (CWnd *pGenericModelessDialog) |
Attach a dialog to the loader. More... | |
void | Checkpoint2ILF () |
Writes out the state variables to the ILF control record. More... | |
void | Commit2ILF (BOOL bSave) |
Writes out the state variables to the commit variables in the ILF control record. Should be called at batch save time, only. More... | |
void | DeleteImageCollection () |
Delete all files in the designated batch image collection directory. More... | |
BOOL | DisplayCollectionImage (long lFile, int iPage, BOOL bDisplayNow=TRUE) |
Open and display an image in the collection directory. More... | |
BOOL | DisplayImage () |
Display image defined by m_lFileCurrent and m_lPageCurrent. More... | |
BOOL | EnterPageDisplayNext () |
Current batch page written to queue. Commit page variables to ILF and fetch next image. More... | |
BOOL | FindNextSerialNumber () |
Find the highest file serial number in the collection and assign that number plus 1. More... | |
BOOL | FtFromIlf (long lFile, BOOL bSerialize=TRUE, BOOL bIsStagingDirectory=FALSE) |
Initialize uninitialized new file tracker records from an allocated and filled in TControlILF and a file list. More... | |
BOOL | GetImageInfo (CString &sReport, BOOL bIgnoreEOF=FALSE) |
Return an image information and statistics report formatted for display in a control with embedded CRLF. More... | |
BOOL | IsSetFT (int iFile, int iPage) |
Check if the specific image in the file has been converted according to the tracker. More... | |
BOOL | ListFirst () |
Load first image from the first file in the list. More... | |
BOOL | ListLast () |
Load the first image from the last file in the list. More... | |
BOOL | MakeReadyILF () |
Using the current batch, load ILF and make ready for data entry. More... | |
BOOL | NewFTListFromOpenDialog (char *&pszError, BOOL bMultiselect=TRUE) |
Create a new FT list using an open dialog. More... | |
BOOL | NewFTListFromStagingDirectory (char *&pszError) |
Create a new FT list by using a directory list of the folder set as a staging directory in the imaging engine. Also displays current image. More... | |
BOOL | NewILFFromStagingDirectory (char *&pszError) |
Create a new ILF with FT list from the staging directory. More... | |
BOOL | NextFile () |
Load first image of the next file in the list. More... | |
BOOL | NextList () |
Load and display next image in list. More... | |
BOOL | PrevFile () |
Load the first image of the previous file in the list. More... | |
BOOL | PrevList () |
Load and display previous image in list. More... | |
BOOL | SameList () |
Load and display the same image as last displayed. More... | |
BOOL | SendHdibToViewer () |
Takes the loaded HDIB and sends it to the viewer. More... | |
void | SetFT (int iFile, int iPage) |
Set a particular image page in a file as converted. More... | |
void | UpdateDirtyImageOnDisk () |
If the image has been changed, update the image on disk. More... | |
Static Public Member Functions | |
static BOOL | IsStagedFileExtension (const char *pszPath) |
Checks for a staged file with a .000 to .999 file extension. More... | |
Public Attributes | |
BOOL | m_bBOF |
Last operation tried to read before the first image in the list. More... | |
BOOL | m_bClearIfNoImage |
If at EOF, clear image instead of displaying it. This simulates hitting EOF while doing KFI. More... | |
BOOL | m_bDisplayImageOnSeek |
If set to TRUE, the "list" API will call DisplayImage. Otherwise, these routines will just set up to call DisplayImage. More... | |
BOOL | m_bEOF |
Last operation passed the last image (last file/last page) in the list. More... | |
BOOL | m_bLoadDirectPerformed |
Set to TRUE if an image was loaded directly via file and page number (e.g., using the image coordinates in the record appendage). More... | |
BOOL | m_bWrapFetch |
If set, allow next to wrap to first and prev to wrap from first to last. If FALSE, clear the image display. More... | |
long | m_lFileCollection |
Last loaded collection file image. Invalidate if -1. Invalidated by non-collection load. More... | |
long | m_lFileCount |
Count of files in the file tracker. More... | |
long | m_lFileCurrent |
The file being tracked. -1 if no file assigned. More... | |
long | m_lNextSerial |
Next serial number to be used for a fresh image. More... | |
long | m_lPageCollection |
Last loaded collection file image. Invalidate if -1. Invalidated by non-collection load. More... | |
long | m_lPageCurrent |
The page being displayed. -1 if no current page. More... | |
TFileTracker * | m_pft |
A content-sized array for file tracker sturctures. More... | |
CGenericModelessDialog * | m_pgmdImageDisplayDialog |
Pointer to the dialog displaying the images. More... | |
CWnd * | m_pWndPopup |
Pointer to parent window for pop-ups. More... | |
CString | m_sUseInsteadOfOpenFileDialog |
Use this path for an auto-open of a file for NewFTListFromOpenDialog. More... | |
TImageLoadUp | m_tImageLoadUp |
Immediate image source of last loaded image. More... | |
UINT | m_uiOpenDialogResult |
An MBxxx result after a NewFTListFromOpenDialog or CImageTracker::GetNewFileList. All other times, consider it undefined. More... | |
Class to handle keeping track of images that are extracted from source files and copied to the batch image collection folder.
Definition at line 28 of file ImageLoader.h.
CImageLoader::CImageLoader | ( | CWnd * | pGenericModelessDialog | ) |
Definition at line 33 of file ImageLoader.cpp.
References AttachDialog(), FALSE, ILUP_NONE, m_bBOF, m_bClearIfNoImage, m_bDisplayImageOnSeek, m_bEOF, m_bLoadDirectPerformed, m_bWrapFetch, m_lFileCollection, m_lFileCount, m_lFileCurrent, m_lNextSerial, m_lPageCollection, m_lPageCurrent, m_pft, m_tImageLoadUp, and TRUE.
CImageLoader::~CImageLoader | ( | ) |
Definition at line 52 of file ImageLoader.cpp.
References CIlfIo::Deallocate(), m_bEOF, m_pft, and CIlfIo::ms_pcAllocation.
void CImageLoader::AttachDialog | ( | CWnd * | pGenericModelessDialog | ) |
Attach a dialog to the loader.
Use once the KS or ZD is created to allow ILF access.
[in] | pGenericModelessDialog | - Dialog to use for processing and popup. Set to NULL to detach. |
Definition at line 75 of file ImageLoader.cpp.
References m_pgmdImageDisplayDialog, m_pWndPopup, and CIlfIo::ms_pWndPopup.
Referenced by CImageLoader(), CFalcon32AddOn::KSClose(), CFalcon32AddOn::KSShowWindow(), CFalcon32AddOn::ZDClose(), and CFalcon32AddOn::ZDShowWindow().
void CImageLoader::Checkpoint2ILF | ( | ) |
Writes out the state variables to the ILF control record.
Checkpoints the change to the change to the ILF.
Should succeed, but gives no error reportin.
Definition at line 143 of file ImageLoader.cpp.
References ctl, TYPE_ILF_CONTROL::lFileCurrent, TYPE_ILF_CONTROL::lNextSerial, TYPE_ILF_CONTROL::lPageCurrent, m_lFileCurrent, m_lNextSerial, m_lPageCurrent, CIlfIo::ms_iIndexDisplayedILF, CIlfIo::ms_pcAllocation, CIlfIo::ms_pCtl, and CIlfIo::PageCommit().
Referenced by EnterPageDisplayNext(), and CFalcon32AddOn::ScanMatchOrLoad().
void CImageLoader::Commit2ILF | ( | BOOL | bSave | ) |
Writes out the state variables to the commit variables in the ILF control record. Should be called at batch save time, only.
Commits the final session state variables to the ILF.
[in] | bSave | - Indicate whether the batch is being saved. |
Definition at line 166 of file ImageLoader.cpp.
References CIlfIo::BatchCommit(), ctl, TYPE_ILF_CONTROL::ILF_SAFE_SHUTDOWN, TYPE_ILF_CONTROL::lFileCurrent, TYPE_ILF_CONTROL::lFileCurrentCommit, TYPE_ILF_CONTROL::lNextSerial, TYPE_ILF_CONTROL::lPageCurrent, TYPE_ILF_CONTROL::lPageCurrentCommit, m_lFileCurrent, m_lNextSerial, m_lPageCurrent, CIlfIo::ms_pcAllocation, and CIlfIo::ms_pCtl.
Referenced by CImageTracker::CloseAndCancel(), and CImageTracker::CloseAndSave().
void CImageLoader::DeleteImageCollection | ( | ) |
Delete all files in the designated batch image collection directory.
Definition at line 1468 of file ImageLoader.cpp.
References BOOL, FALSE, g_pCImagingEngine, and CImagingState::GetImageCollectionDirectory().
Referenced by CTestDialog::OnBnClickedButtonCleanTest().
Open and display an image in the collection directory.
Read an image from the collection and optionally place it in the viewer.
TRUE | - Success. |
FALSE | - Failed to load or display the image (as applicable). Check the imaging engine m_szError for more information. |
lFile | - A value between 1 and 9999 specifying the file serial number. |
iPage | - A value between 0 and 255 specifying the page of the image in the file. |
bDisplayNow | - Use to override, if TRUE (default) the current m_bDisplayImageOnSeek setting for just this call. |
Definition at line 998 of file ImageLoader.cpp.
References BOOL, CImagingEngine::Decode(), FALSE, g_pCImagingEngine, CImagingEngine::GetF3TPathToImageCollectionDirectory(), CImagingEngine::GetFalcon32TIFFInfo(), ILUP_COLLECTION, ILUP_NONE, CImageInfo::lCountPages, m_bDisplayImageOnSeek, m_bLoadDirectPerformed, m_lFileCollection, m_lPageCollection, CImagingEngine::m_szError, m_tImageLoadUp, SendHdibToViewer(), TRUE, and UpdateDirtyImageOnDisk().
Referenced by CFormatImageDisplayDialog::OnBnClickedButtonDeleteSample(), CFormatImageDisplayDialog::OnBnClickedButtonNextSample(), CFakeBatchModelessDialog::OnBnClickedButtonReopen(), CFalcon32AddOn::OnPagingDisplayInitialScan(), CFalcon32AddOn::OnRecvVerifyModeTop(), and CFormatImageDisplayDialog::StartSession().
BOOL CImageLoader::DisplayImage | ( | ) |
Display image defined by m_lFileCurrent and m_lPageCurrent.
Read an image and place it in the viewer.
Coordinates copying staged files to collection. Decodes and creates files in the collection from source image files.
TRUE | - Success. |
FALSE | - Failed to load the image. Except for m_pft set to NULL, check the imaging engine m_szError for more information. |
Definition at line 851 of file ImageLoader.cpp.
References BOOL, CImagingEngine::CopyStagedFileToBatchImageCollection(), CRYPTWITH_NONE, ctl, CImagingEngine::Decode(), CImageInfo::eCryptWith, CGenericModelessDialog::ExternalClearHDIB(), FALSE, CImageInfo::fEncrypted, T_FILETRACKER::fIsStagingDirectory, g_pCImagingEngine, CImagingEngine::GetF3TPathToImageCollectionDirectory(), CImagingEngine::GetFalcon32TIFFInfo(), CIlfIo::GetFullPath(), ILUP_COLLECTION, ILUP_NONE, ILUP_RAW, ILUP_STAGING, IsSetFT(), T_FILETRACKER::lCountPages, CImageInfo::lCountPages, T_FILETRACKER::lSerial, m_bClearIfNoImage, m_bEOF, m_bWrapFetch, m_lFileCollection, m_lFileCount, m_lFileCurrent, m_lPageCollection, m_lPageCurrent, m_pft, m_pgmdImageDisplayDialog, CImagingEngine::m_szError, m_tImageLoadUp, CIlfIo::ms_pcAllocation, CIlfIo::ms_pCtl, CImagingEngine::OpenUnconvertedImage(), CImagingEngine::OutputFalcon32TIFF(), CImagingEngine::SAVETO_IMAGECOLLECTION, SendHdibToViewer(), CImagingEngine::SetOcrControlData(), CImagingEngine::SetOcrData(), TRUE, and UpdateDirtyImageOnDisk().
Referenced by CImageTracker::DisplayGet(), CImageTracker::GetNextImageDoc(), ListFirst(), ListLast(), MakeReadyILF(), NewFTListFromOpenDialog(), NewFTListFromStagingDirectory(), NextFile(), NextList(), PrevFile(), PrevList(), and SameList().
BOOL CImageLoader::EnterPageDisplayNext | ( | ) |
Current batch page written to queue. Commit page variables to ILF and fetch next image.
TRUE | - An image has been loaded. |
FALSE | - No image is loaded, or image failed to load. |
Definition at line 1501 of file ImageLoader.cpp.
References BOOL, Checkpoint2ILF(), FALSE, CIlfIo::ms_pcAllocation, and NextList().
Referenced by CImageTracker::CommitImageForCommittedBatchPage().
BOOL CImageLoader::FindNextSerialNumber | ( | ) |
Find the highest file serial number in the collection and assign that number plus 1.
Read the collection directory.
Find the highest serial number. Assign found + 1. MINIMUM is 0001.
TRUE | - Value assigned. |
FALSE | - The count of 9999 exceeded! (Not bloody likely.) |
Definition at line 197 of file ImageLoader.cpp.
References BOOL, FALSE, g_pCImagingEngine, CImagingState::GetImageCollectionDirectory(), m_lNextSerial, and TRUE.
Referenced by FtFromIlf(), NewFTListFromOpenDialog(), NewILFFromStagingDirectory(), and CFakeBatchModelessDialog::OnBnClickedOpenImage().
BOOL CImageLoader::FtFromIlf | ( | long | lFile, |
BOOL | bSerialize = TRUE , |
||
BOOL | bIsStagingDirectory = FALSE |
||
) |
Initialize uninitialized new file tracker records from an allocated and filled in TControlILF and a file list.
[in] | lFile | - The number of the file in the list that is current. |
[in] | bSerialize | - Assign serial numbers a newly created file tracker array. When copying an existing ILF into memory, this should be FALSE. |
[in] | bIsStagingDirectory | - Default FALSE. Set to TRUE to specify that the directory in the ctl contains staged files (even if different than the system staging directory). |
TRUE | - The file tracker is properly set up. |
FALSE | - A problem occurred and the file tracker array is not setup properly. Verify image collection and staging paths. |
Definition at line 710 of file ImageLoader.cpp.
References BatchDirectory(), bch, T_FILETRACKER::ctl, ctl, FALSE, FindNextSerialNumber(), T_FILETRACKER::fIsStagingDirectory, FT_EYECATCHER, g_pCImagingEngine, i, TYPE_ILF_CONTROL::iCount, T_FILETRACKER::lSerial, m_bBOF, m_bEOF, m_lFileCount, m_lFileCurrent, m_lNextSerial, m_lPageCurrent, m_pft, CImageDisplayDialog::MakeStagingPath(), CIlfIo::ms_pcAllocation, CIlfIo::ms_pCtl, CIlfIo::ms_pFT, CImagingEngine::SetImageCollectionDirectory(), CImagingEngine::SetStagingDirectory(), TYPE_ILF_CONTROL::szPath, and TRUE.
Referenced by CIlfIo::BuildILF().
Return an image information and statistics report formatted for display in a control with embedded CRLF.
TRUE | - Successfully formatted the report. |
FALSE | - Failed to get the report. Error in the report variable. |
[in] | bIgnoreEOF | - Default FALSE. Set TRUE to ignore the value of m_bEOF (to properly handle paging, verify mode images). |
[out] | sReport | - CString reference that will receive the report or error message. |
Definition at line 1082 of file ImageLoader.cpp.
References BOOL, CImageInfo::cbaData, CImageInfo::cbaTime, CImageInfo::cbOper, CRYPTWITH_NONE, CImageInfo::eCryptWith, FALSE, CImageInfo::fEncrypted, CImageInfo::ftWrite, g_pCImagingEngine, CImagingState::GetBmp(), CImagingEngine::GetEncryptionTypeString(), CImagingEngine::GetImageInfo(), CImagingEngine::GetOriginalPathLastConverted(), ILUP_COLLECTION, ILUP_RAW, ILUP_STAGING, CImageInfo::lBatchImageCollectionSerial, CImageInfo::lBitsPerPixel, CImageInfo::lCountPages, CImageInfo::lHeight, CImageInfo::lPage, CImageInfo::lResX, CImageInfo::lResY, CImageInfo::lTimeBitonal, CImageInfo::lTimeDecrypt, CImageInfo::lTimeEncrypt, CImageInfo::lTimeFalcon32Load, CImageInfo::lTimeGrey, CImageInfo::lTimeGrow, CImageInfo::lTimeLoad, CImageInfo::lWidth, m_bClearIfNoImage, m_bEOF, m_bWrapFetch, m_tImageLoadUp, TRUE, CImageInfo::ulTimeRecognition, and CImageInfo::usiCountRecognition.
Referenced by CFakeBatchModelessDialog::OnBnClickedButtonGetImageInfo(), and UpdateImageInfoTab().
BOOL CImageLoader::IsSetFT | ( | int | iFile, |
int | iPage | ||
) |
Check if the specific image in the file has been converted according to the tracker.
Check if a page indicator for a specific file is set to TRUE indicating the page has been converted and serialized.
[in] | iFile | - File whose pages we are to check. |
[in] | iPage | - Specific page in the file to check. |
TRUE | - Bit was on. |
FALSE | - Bit was off. |
Definition at line 95 of file ImageLoader.cpp.
References T_FILETRACKER::cPageBits, FALSE, FT_MAX_PAGES, m_pft, CIlfIo::ms_pcAllocation, and s_ucNumberToBit.
Referenced by DisplayImage(), NewFTListFromOpenDialog(), and NewILFFromStagingDirectory().
|
static |
Checks for a staged file with a .000 to .999 file extension.
pszPath | - Path to a file. |
TRUE | - File has an pure digit extension, signifing a staged file. |
FALSE | - File may be staged, but not due to the extension orthography. |
Definition at line 2264 of file ImageLoader.cpp.
Referenced by CIlfIo::GetFileListFromListbox(), and NewFTListFromOpenDialog().
BOOL CImageLoader::ListFirst | ( | ) |
Load first image from the first file in the list.
This routine doesn't correspond to a data entry command and probably only has utility as some sort of image browser.
TRUE | - If m_bDisplayImageOnSeek is TRUE, this is the return value from DisplayImage. Otherwise, it means success. |
FALSE | - Some failure, probably setup. It could also be a DisplayImage failure, so check ie.m_szError. |
Definition at line 1305 of file ImageLoader.cpp.
References DisplayImage(), FALSE, m_bBOF, m_bDisplayImageOnSeek, m_bEOF, m_lFileCount, m_lFileCurrent, m_lPageCurrent, m_pft, CIlfIo::ms_pcAllocation, and TRUE.
Referenced by CFakeBatchModelessDialog::OnBnClickedButtonListFirst().
BOOL CImageLoader::ListLast | ( | ) |
Load the first image from the last file in the list.
This routine doesn't correspond to a data entry command and probably only has utility as some sort of image browser.
TRUE | - If m_bDisplayImageOnSeek is TRUE, this is the return value from DisplayImage. Otherwise, it means success. |
FALSE | - Some failure, probably setup. It could also be a DisplayImage failure, so check ie.m_szError. |
Definition at line 1339 of file ImageLoader.cpp.
References DisplayImage(), FALSE, g_pCImagingEngine, m_bBOF, m_bDisplayImageOnSeek, m_bEOF, m_lFileCount, m_lFileCurrent, m_lPageCurrent, m_pft, CIlfIo::ms_pcAllocation, and TRUE.
Referenced by CFakeBatchModelessDialog::OnBnClickedButtonListLast().
BOOL CImageLoader::MakeReadyILF | ( | ) |
Using the current batch, load ILF and make ready for data entry.
TRUE | - Load up succeeded, or if no file, ILF load skipped normally. If m_bDisplayImageOnSeek is TRUE, the image was displayed after load up. EOF is an exceptable result for a batch rescue with images exhausted. Check m_bEOF. |
FALSE | - Load up failed. Could also mean that image failed to display but load up succeeded. |
Definition at line 761 of file ImageLoader.cpp.
References BatchDirectory(), bch, ctl, DisplayImage(), FALSE, g_pCImagingEngine, TYPE_ILF_CONTROL::iCount, TYPE_ILF_CONTROL::ILF_SAFE_SHUTDOWN, CIlfIo::IsILF(), TYPE_ILF_CONTROL::lFileCurrent, TYPE_ILF_CONTROL::lFileCurrentCommit, TYPE_ILF_CONTROL::lNextSerial, CIlfIo::Load2MemoryILF(), TYPE_ILF_CONTROL::lPageCurrent, TYPE_ILF_CONTROL::lPageCurrentCommit, m_bBOF, m_bDisplayImageOnSeek, m_bEOF, m_lFileCount, m_lFileCurrent, m_lNextSerial, m_lPageCurrent, m_pft, m_pWndPopup, CImagingEngine::m_szError, CIlfIo::ms_iIndexDisplayedILF, CIlfIo::ms_pcAllocation, CIlfIo::ms_pCtl, CIlfIo::ms_pFT, CImagingEngine::SetImageCollectionDirectory(), and TRUE.
Referenced by CImageTracker::GetNewFileList(), CFalcon32AddOn::OnBatchLoadSuccess(), and CFakeBatchModelessDialog::OnInitDialog().
Create a new FT list using an open dialog.
Displays an open dialog and constructs a FT list.
It can be used to open a single image (as in format generator) or multiple images.
Have to get the real staging directory instead of the test one.
Code hard codes "Sample" batch when creating ILF file.
TRUE | if successful, else check pszError. Depending on m_bDisplayImageOnSeek, it will return TRUE is display succeeded or TRUE if successful getting ready to display the image. |
[out] | pszError | - Will contain a pointer to a string if the function returns FALSE. It is an imaging engine error or a "No Files Selected" message. |
[in] | bMultiselect | - True (default) - Allow multiple images to be selected. False - Allow one image to be selected. |
Definition at line 251 of file ImageLoader.cpp.
References CIlfIo::Allocate(), BOOL, compare(), T_FILETRACKER::ctl, ctl, CIlfIo::Deallocate(), DisplayImage(), FALSE, FindNextSerialNumber(), T_FILETRACKER::fIsStagingDirectory, FT_EYECATCHER, FT_MAX_PAGES, g_pCImagingEngine, CIlfIo::GetFileString(), i, TYPE_ILF_CONTROL::iBlocksize, TYPE_ILF_CONTROL::iCount, TYPE_ILF_CONTROL::iIndexBatchCommit, TYPE_ILF_CONTROL::iIndexPageCommit, TYPE_ILF_CONTROL::ILF_SAFE_SHUTDOWN, IsFile(), IsSetFT(), IsStagedFileExtension(), T_FILETRACKER::lSerial, m_bBOF, m_bDisplayImageOnSeek, m_bEOF, m_lFileCount, m_lFileCurrent, m_lNextSerial, m_lPageCurrent, m_pft, m_pWndPopup, m_sUseInsteadOfOpenFileDialog, CImagingEngine::m_szError, m_uiOpenDialogResult, CImageDisplayDialog::MakeStagingPath(), MAX_FILE_LIST, CIlfIo::ms_iIndexBatchCommitILF, CIlfIo::ms_iIndexDisplayedILF, CIlfIo::ms_iIndexPageCommitILF, CIlfIo::ms_pcAllocation, CIlfIo::ms_pCtl, CIlfIo::ms_pFT, CIlfIo::ms_pszFileList, CIlfIo::ms_pWndPopup, return, SetFT(), CImagingEngine::SetStagingDirectory(), TYPE_ILF_CONTROL::szPath, TRUE, and CIlfIo::WriteCompleteFile().
Referenced by CImageTracker::GetNewFileList(), CFakeBatchModelessDialog::OnBnClickedButtonNewList(), CFormatImageDisplayDialog::OnBnClickedButtonNewSample(), and CFakeBatchModelessDialog::OnBnClickedButtonSingleFileList().
BOOL CImageLoader::NewFTListFromStagingDirectory | ( | char *& | pszError | ) |
Create a new FT list by using a directory list of the folder set as a staging directory in the imaging engine. Also displays current image.
Calls NewILFFromStagingList, then if successful, it displays the first image.
TRUE | - Successful. Depending on m_bDisplayImageOnSeek, it will return TRUE is display succeeded or TRUE if successful getting ready to display the image. |
FALSE | - The operation failed. The error is reported in pszError. |
[out] | pszError | - If an error occurs, this will point to the imaging engine error area or a text constant. |
Definition at line 677 of file ImageLoader.cpp.
References DisplayImage(), FALSE, g_pCImagingEngine, m_bDisplayImageOnSeek, CImagingEngine::m_szError, NewILFFromStagingDirectory(), and TRUE.
Referenced by CFakeBatchModelessDialog::OnBnClickedButtonStageList().
BOOL CImageLoader::NewILFFromStagingDirectory | ( | char *& | pszError | ) |
Create a new ILF with FT list from the staging directory.
Reads the entire staging directory (find first/next) for .000 through .999 files and forms a standard ILF using them.
DOES NOT READ THE IMAGES.
TRUE | - Successful. |
FALSE | - The operation failed. The error is reported in pszError. |
[out] | pszError | - If an error occurs, this will point to the imaging engine error area or a text constant. |
Definition at line 525 of file ImageLoader.cpp.
References CIlfIo::Allocate(), BOOL, T_FILETRACKER::ctl, ctl, CIlfIo::Deallocate(), FALSE, TYPE_WAYBILL_DATA::fCT_AssignImagesForKFI, TYPE_WAYBILL_DATA::fCT_PrerecordOCR, FindNextSerialNumber(), T_FILETRACKER::fIsStagingDirectory, FT_EYECATCHER, FT_MAX_PAGES, g_pCImagingEngine, CIlfIo::GetFileString(), CImagingState::GetImageCollectionDirectory(), CImagingState::GetStagingDirectoryBase(), CWaybillWaitingForWork::GetWaybill(), i, TYPE_ILF_CONTROL::iBlocksize, TYPE_ILF_CONTROL::iCount, TYPE_ILF_CONTROL::iIndexBatchCommit, TYPE_ILF_CONTROL::iIndexPageCommit, TYPE_ILF_CONTROL::ILF_SAFE_SHUTDOWN, IsSetFT(), CWaybillWaitingForWork::IsUsingWaybill(), T_FILETRACKER::lSerial, m_bBOF, m_bEOF, m_lFileCount, m_lFileCurrent, m_lNextSerial, m_lPageCurrent, m_pft, m_pWndPopup, CImagingEngine::m_szError, CWaybill::m_wd, CIlfIo::ms_iIndexBatchCommitILF, CIlfIo::ms_iIndexDisplayedILF, CIlfIo::ms_iIndexPageCommitILF, CIlfIo::ms_pcAllocation, CIlfIo::ms_pCtl, CIlfIo::ms_pFT, CIlfIo::ms_pWndPopup, SetFT(), TYPE_ILF_CONTROL::szDocumentMask, TYPE_WAYBILL_DATA::szIA_DocumentMask, TYPE_ILF_CONTROL::szPath, TRUE, and CIlfIo::WriteCompleteFile().
Referenced by NewFTListFromStagingDirectory().
BOOL CImageLoader::NextFile | ( | ) |
Load first image of the next file in the list.
This routine doesn't correspond to a data entry command and probably only has utility as some sort of image browser.
It does correspond to an operator issuing the next document command with no document mask.
bSuccess | - This is the return value from DisplayImage. |
Definition at line 1375 of file ImageLoader.cpp.
References DisplayImage(), FALSE, m_bBOF, m_bClearIfNoImage, m_bEOF, m_bLoadDirectPerformed, m_bWrapFetch, m_lFileCount, m_lFileCurrent, m_lPageCurrent, m_pft, CIlfIo::ms_pcAllocation, and TRUE.
Referenced by CFakeBatchModelessDialog::OnBnClickedButtonNextFile().
BOOL CImageLoader::NextList | ( | ) |
Load and display next image in list.
This is the routine that will handle the normal image to image progression during entry.
TRUE | - If m_bDisplayImageOnSeek is TRUE, this is the return value from DisplayImage. Otherwise, it means success. |
FALSE | - Some failure, probably setup. It could also be a DisplayImage failure, so check ie.m_szError. |
Definition at line 1155 of file ImageLoader.cpp.
References DisplayImage(), FALSE, m_bBOF, m_bClearIfNoImage, m_bDisplayImageOnSeek, m_bEOF, m_bLoadDirectPerformed, m_bWrapFetch, m_lFileCount, m_lFileCurrent, m_lPageCurrent, m_pft, CIlfIo::ms_iIndexDisplayedILF, CIlfIo::ms_pcAllocation, and TRUE.
Referenced by EnterPageDisplayNext(), CImageTracker::GetNextImage(), CFakeBatchModelessDialog::OnBnClickedButtonNextList(), and CFalcon32AddOn::ScanMatchOrLoad().
BOOL CImageLoader::PrevFile | ( | ) |
Load the first image of the previous file in the list.
This routine doesn't correspond to a data entry command and probably only has utility as some sort of image browser.
It does correspond to an operator issuing the previous document command with no document mask.
bSuccess | - This is the return value from DisplayImage. |
Definition at line 1425 of file ImageLoader.cpp.
References BOOL, DisplayImage(), FALSE, m_bBOF, m_bClearIfNoImage, m_bEOF, m_bLoadDirectPerformed, m_lFileCount, m_lFileCurrent, m_lPageCurrent, m_pft, CIlfIo::ms_pcAllocation, and TRUE.
Referenced by CFakeBatchModelessDialog::OnBnClickedButtonPrevFile().
BOOL CImageLoader::PrevList | ( | ) |
Load and display previous image in list.
This routine is to be assigned to an imaging command to fetch a replacement image during entry.
TRUE | - If m_bDisplayImageOnSeek is TRUE, this is the return value from DisplayImage. Otherwise, it means success. |
FALSE | - Some failure, probably setup. It could also be a DisplayImage failure, so check ie.m_szError. |
Definition at line 1208 of file ImageLoader.cpp.
References BOOL, DisplayImage(), FALSE, T_FILETRACKER::lCountPages, m_bBOF, m_bClearIfNoImage, m_bDisplayImageOnSeek, m_bEOF, m_bLoadDirectPerformed, m_bWrapFetch, m_lFileCount, m_lFileCurrent, m_lPageCurrent, m_pft, CIlfIo::ms_iIndexDisplayedILF, CIlfIo::ms_pcAllocation, and TRUE.
Referenced by CImageTracker::GetPrevImage(), CFakeBatchModelessDialog::OnBnClickedButtonPrevList(), and CFalcon32AddOn::ScanMatchOrLoad().
BOOL CImageLoader::SameList | ( | ) |
Load and display the same image as last displayed.
This routine is intended to reload the last image displayed before entering a paging mode.
TRUE | - If m_bDisplayImageOnSeek is TRUE, this is the return value from DisplayImage. Otherwise, it means success. |
FALSE | - Some failure, probably setup. It could also be a DisplayImage failure, so check ie.m_szError. |
Definition at line 1273 of file ImageLoader.cpp.
References DisplayImage(), FALSE, m_bBOF, m_bDisplayImageOnSeek, m_bEOF, m_lFileCount, m_lFileCurrent, m_lPageCurrent, m_pft, CIlfIo::ms_pcAllocation, and TRUE.
Referenced by CImageTracker::GetNextImageDoc(), CImageTracker::GetPrevImageDoc(), CFakeBatchModelessDialog::OnBnClickedButtonLoadagain(), and CFalcon32AddOn::ScanMatchOrLoad().
BOOL CImageLoader::SendHdibToViewer | ( | ) |
Takes the loaded HDIB and sends it to the viewer.
Will update the file tracker for images associated with the file tracker.
Definition at line 1041 of file ImageLoader.cpp.
References CGenericModelessDialog::ExternalSetHDIB(), FALSE, g_pCImagingEngine, CImagingState::GetHDIB(), CImagingState::GetPageCount(), T_FILETRACKER::lCountPages, m_bLoadDirectPerformed, m_lFileCurrent, m_lPageCurrent, m_pft, m_pgmdImageDisplayDialog, CIlfIo::ms_pcAllocation, SetFT(), and TRUE.
Referenced by DisplayCollectionImage(), DisplayImage(), and CFakeBatchModelessDialog::OnBnClickedButtonSendHdib().
void CImageLoader::SetFT | ( | int | iFile, |
int | iPage | ||
) |
Set a particular image page in a file as converted.
Set a bit representing a page in the TFileTracker to TRUE.
Checkpoints the file tracker change to the change to the ILF, but does not commit the current ILF or FT tracker variables to the ILF.
[in] | iFile | - File whose pages we are to check. |
[in] | iPage | - Specific page in the file to check. |
Definition at line 121 of file ImageLoader.cpp.
References T_FILETRACKER::cPageBits, FT_MAX_PAGES, m_pft, CIlfIo::ms_pcAllocation, s_ucNumberToBit, and CIlfIo::WriteThruFT().
Referenced by NewFTListFromOpenDialog(), NewILFFromStagingDirectory(), and SendHdibToViewer().
void CImageLoader::UpdateDirtyImageOnDisk | ( | ) |
If the image has been changed, update the image on disk.
Definition at line 824 of file ImageLoader.cpp.
References FALSE, g_pCImagingEngine, C_GdViewer::GetHBitmap(), CGenericModelessDialog::m_bDirty, m_pgmdImageDisplayDialog, CImageViewer::m_viewer, and CImagingEngine::ReoutputFalcon32TIFF().
Referenced by CImageTracker::CloseAndCancel(), CImageTracker::CloseAndSave(), CImageTracker::CloseAndStrand(), DisplayCollectionImage(), and DisplayImage().
BOOL CImageLoader::m_bBOF |
Last operation tried to read before the first image in the list.
Definition at line 45 of file ImageLoader.h.
Referenced by CImageLoader(), FtFromIlf(), CImageTracker::GetNewFileList(), CImageTracker::GetPrevImage(), CImageTracker::GetPrevImageDoc(), CFakeBatchModelessDialog::ListButtonsOn(), ListFirst(), ListLast(), MakeReadyILF(), NewFTListFromOpenDialog(), NewILFFromStagingDirectory(), NextFile(), NextList(), CFakeBatchModelessDialog::OnInitDialog(), PrevFile(), PrevList(), and SameList().
BOOL CImageLoader::m_bClearIfNoImage |
If at EOF, clear image instead of displaying it. This simulates hitting EOF while doing KFI.
Definition at line 46 of file ImageLoader.h.
Referenced by CImageLoader(), DisplayImage(), GetImageInfo(), CFakeBatchModelessDialog::ListButtonsOff(), CFakeBatchModelessDialog::ListButtonsOn(), NextFile(), NextList(), CFakeBatchModelessDialog::OnInitDialog(), PrevFile(), and PrevList().
BOOL CImageLoader::m_bDisplayImageOnSeek |
If set to TRUE, the "list" API will call DisplayImage. Otherwise, these routines will just set up to call DisplayImage.
Definition at line 48 of file ImageLoader.h.
Referenced by CImageLoader(), CImageTracker::CommitImageForCommittedBatchPage(), DisplayCollectionImage(), CImageTracker::GetNextImage(), CImageTracker::GetNextImageDoc(), CImageTracker::GetPrevImage(), CImageTracker::GetPrevImageDoc(), CFalcon32AddOn::KSAssignNewScanFileInPaging(), CFakeBatchModelessDialog::ListButtonsOn(), ListFirst(), ListLast(), MakeReadyILF(), NewFTListFromOpenDialog(), NewFTListFromStagingDirectory(), NextList(), CFakeBatchModelessDialog::OnBnClickedButtonCommitPage(), CFormatImageDisplayDialog::OnBnClickedButtonDeleteSample(), CFakeBatchModelessDialog::OnBnClickedButtonGetNext(), CFakeBatchModelessDialog::OnBnClickedButtonListFirst(), CFakeBatchModelessDialog::OnBnClickedButtonListLast(), CFakeBatchModelessDialog::OnBnClickedButtonLoadagain(), CFakeBatchModelessDialog::OnBnClickedButtonNewList(), CFormatImageDisplayDialog::OnBnClickedButtonNewSample(), CFakeBatchModelessDialog::OnBnClickedButtonNextDoc(), CFakeBatchModelessDialog::OnBnClickedButtonNextFile(), CFakeBatchModelessDialog::OnBnClickedButtonNextList(), CFormatImageDisplayDialog::OnBnClickedButtonNextSample(), CFakeBatchModelessDialog::OnBnClickedButtonPageBack(), CFakeBatchModelessDialog::OnBnClickedButtonPrevDoc(), CFakeBatchModelessDialog::OnBnClickedButtonPrevFile(), CFakeBatchModelessDialog::OnBnClickedButtonPrevList(), CFakeBatchModelessDialog::OnBnClickedButtonReopen(), CFakeBatchModelessDialog::OnBnClickedButtonSeamlessMultifileDialog(), CFakeBatchModelessDialog::OnBnClickedButtonSingleFileList(), CFakeBatchModelessDialog::OnBnClickedButtonStageList(), CFakeBatchModelessDialog::OnBnClickedCheckDisplayOnSeek(), CFakeBatchModelessDialog::OnInitDialog(), CFalcon32AddOn::OnPagingDisplayInitialScan(), CFalcon32AddOn::OnRecvVerifyModeTop(), PrevList(), SameList(), CFalcon32AddOn::ScanMatchOrLoad(), and CFormatImageDisplayDialog::StartSession().
BOOL CImageLoader::m_bEOF |
Last operation passed the last image (last file/last page) in the list.
Definition at line 44 of file ImageLoader.h.
Referenced by CImageLoader(), CImageTracker::CloseAndSave(), DisplayImage(), FtFromIlf(), GetImageInfo(), CImageTracker::GetNewFileList(), CImageTracker::GetNextImage(), CImageTracker::GetNextImageDoc(), CFalcon32AddOn::KSOnDisplayScanController(), CFakeBatchModelessDialog::ListButtonsOn(), ListFirst(), ListLast(), MakeReadyILF(), NewFTListFromOpenDialog(), NewILFFromStagingDirectory(), NextFile(), NextList(), CFalcon32AddOn::OnBatchLoadSuccess(), CFakeBatchModelessDialog::OnInitDialog(), PrevFile(), PrevList(), SameList(), CFalcon32AddOn::ScanMatchOrLoad(), and ~CImageLoader().
BOOL CImageLoader::m_bLoadDirectPerformed |
Set to TRUE if an image was loaded directly via file and page number (e.g., using the image coordinates in the record appendage).
Definition at line 42 of file ImageLoader.h.
Referenced by CImageLoader(), DisplayCollectionImage(), NextFile(), NextList(), PrevFile(), PrevList(), and SendHdibToViewer().
BOOL CImageLoader::m_bWrapFetch |
If set, allow next to wrap to first and prev to wrap from first to last. If FALSE, clear the image display.
Definition at line 43 of file ImageLoader.h.
Referenced by CImageLoader(), DisplayImage(), GetImageInfo(), CFakeBatchModelessDialog::ListButtonsOff(), CFakeBatchModelessDialog::ListButtonsOn(), NextFile(), NextList(), CFakeBatchModelessDialog::OnInitDialog(), and PrevList().
long CImageLoader::m_lFileCollection |
Last loaded collection file image. Invalidate if -1. Invalidated by non-collection load.
Definition at line 50 of file ImageLoader.h.
Referenced by CImageLoader(), DisplayCollectionImage(), and DisplayImage().
long CImageLoader::m_lFileCount |
Count of files in the file tracker.
Definition at line 41 of file ImageLoader.h.
Referenced by CImageLoader(), DisplayImage(), FtFromIlf(), ListFirst(), ListLast(), MakeReadyILF(), NewFTListFromOpenDialog(), NewILFFromStagingDirectory(), NextFile(), NextList(), CFalcon32AddOn::OnUpdateStatusTab(), PrevFile(), PrevList(), and SameList().
long CImageLoader::m_lFileCurrent |
The file being tracked. -1 if no file assigned.
Definition at line 39 of file ImageLoader.h.
Referenced by Checkpoint2ILF(), CImageLoader(), Commit2ILF(), DisplayImage(), FtFromIlf(), CImageTracker::GetNextImageDoc(), CImageTracker::GetPrevImageDoc(), CFalcon32AddOn::KSAssignNewScanFileInPaging(), ListFirst(), ListLast(), MakeReadyILF(), NewFTListFromOpenDialog(), NewILFFromStagingDirectory(), NextFile(), NextList(), CFalcon32AddOn::OnBatchLoadSuccess(), CFormatImageDisplayDialog::OnBnClickedButtonNewSample(), CFalcon32AddOn::OnUpdateStatusTab(), PrevFile(), PrevList(), SameList(), CFalcon32AddOn::ScanMatchOrLoad(), and SendHdibToViewer().
long CImageLoader::m_lNextSerial |
Next serial number to be used for a fresh image.
Definition at line 38 of file ImageLoader.h.
Referenced by CIlfIo::BuildILF(), Checkpoint2ILF(), CImageLoader(), Commit2ILF(), FindNextSerialNumber(), FtFromIlf(), MakeReadyILF(), NewFTListFromOpenDialog(), NewILFFromStagingDirectory(), and CFakeBatchModelessDialog::OnBnClickedOpenImage().
long CImageLoader::m_lPageCollection |
Last loaded collection file image. Invalidate if -1. Invalidated by non-collection load.
Definition at line 51 of file ImageLoader.h.
Referenced by CImageLoader(), DisplayCollectionImage(), and DisplayImage().
long CImageLoader::m_lPageCurrent |
The page being displayed. -1 if no current page.
Definition at line 40 of file ImageLoader.h.
Referenced by Checkpoint2ILF(), CImageLoader(), Commit2ILF(), DisplayImage(), FtFromIlf(), CImageTracker::GetNextImageDoc(), CImageTracker::GetPrevImageDoc(), CFalcon32AddOn::KSAssignNewScanFileInPaging(), ListFirst(), ListLast(), MakeReadyILF(), NewFTListFromOpenDialog(), NewILFFromStagingDirectory(), NextFile(), NextList(), CFalcon32AddOn::OnBatchLoadSuccess(), CFormatImageDisplayDialog::OnBnClickedButtonNewSample(), PrevFile(), PrevList(), SameList(), CFalcon32AddOn::ScanMatchOrLoad(), and SendHdibToViewer().
TFileTracker* CImageLoader::m_pft |
A content-sized array for file tracker sturctures.
Definition at line 35 of file ImageLoader.h.
Referenced by CImageLoader(), DisplayImage(), FtFromIlf(), IsSetFT(), CFalcon32AddOn::KSAssignNewScanFileInPaging(), ListFirst(), ListLast(), MakeReadyILF(), NewFTListFromOpenDialog(), NewILFFromStagingDirectory(), NextFile(), NextList(), CFalcon32AddOn::OnBatchLoadSuccess(), CFormatImageDisplayDialog::OnBnClickedButtonNewSample(), PrevFile(), PrevList(), SameList(), CFalcon32AddOn::ScanMatchOrLoad(), SendHdibToViewer(), SetFT(), and ~CImageLoader().
CGenericModelessDialog* CImageLoader::m_pgmdImageDisplayDialog |
Pointer to the dialog displaying the images.
Definition at line 36 of file ImageLoader.h.
Referenced by AttachDialog(), CImageTracker::CloseAndCancel(), CImageTracker::CloseAndSave(), CImageTracker::CloseAndStrand(), DisplayImage(), CImageTracker::GetNewFileList(), SendHdibToViewer(), and UpdateDirtyImageOnDisk().
CWnd* CImageLoader::m_pWndPopup |
Pointer to parent window for pop-ups.
Definition at line 37 of file ImageLoader.h.
Referenced by AttachDialog(), CImageTracker::CloseAndSave(), CImageTracker::CommitImageForCommittedBatchPage(), CImageTracker::DisplayGet(), CImageTracker::GetNewFileList(), CImageTracker::GetNextImage(), CImageTracker::GetNextImageDoc(), CImageTracker::GetPrevImage(), CImageTracker::GetPrevImageDoc(), CFalcon32AddOn::KSOnDisplayScanController(), MakeReadyILF(), NewFTListFromOpenDialog(), and NewILFFromStagingDirectory().
CString CImageLoader::m_sUseInsteadOfOpenFileDialog |
Use this path for an auto-open of a file for NewFTListFromOpenDialog.
Definition at line 47 of file ImageLoader.h.
Referenced by NewFTListFromOpenDialog(), and CFakeBatchModelessDialog::OnBnClickedOpenImage().
TImageLoadUp CImageLoader::m_tImageLoadUp |
Immediate image source of last loaded image.
Definition at line 49 of file ImageLoader.h.
Referenced by CImageLoader(), DisplayCollectionImage(), DisplayImage(), and GetImageInfo().
UINT CImageLoader::m_uiOpenDialogResult |
An MBxxx result after a NewFTListFromOpenDialog or CImageTracker::GetNewFileList. All other times, consider it undefined.
Definition at line 52 of file ImageLoader.h.
Referenced by CImageTracker::GetNewFileList(), NewFTListFromOpenDialog(), and CFormatImageDisplayDialog::OnBnClickedButtonNewSample().