Skip to content

Latest commit

 

History

History
90 lines (65 loc) · 4.28 KB

nf-wia_lh-iwiasegmentationfilter-detectregions.md

File metadata and controls

90 lines (65 loc) · 4.28 KB
UID title description tech.root ms.date keywords ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames f1_keywords topic_type api_type api_location api_name
NF:wia_lh.IWiaSegmentationFilter.DetectRegions
IWiaSegmentationFilter::DetectRegions (wia_lh.h)
The IWiaSegmentationFilter::DetectRegions method determines the subregions of an image laid out on the flatbed platen so that each subregion can be acquired into a separate image item.
image
11/10/2022
IWiaSegmentationFilter::DetectRegions
DetectRegions, DetectRegions method [Imaging Devices], DetectRegions method [Imaging Devices],IWiaSegmentationFilter interface, IWiaSegmentationFilter interface [Imaging Devices],DetectRegions method, IWiaSegmentationFilter.DetectRegions, IWiaSegmentationFilter::DetectRegions, image.iwiasegmentationfilter_detectregions, iwiasegmentationfilter_d819daf8-a36c-448c-a566-bb3c864cea40.xml, wia_lh/IWiaSegmentationFilter::DetectRegions
wia_lh.h
Wia_lh.h
Desktop
Windows
IWiaSegmentationFilter::DetectRegions
wia_lh/IWiaSegmentationFilter::DetectRegions
APIRef
kbSyntax
COM
wia_lh.h
IWiaSegmentationFilter::DetectRegions

-description

The IWiaSegmentationFilter::DetectRegions method determines the subregions of an image laid out on the flatbed platen so that each subregion can be acquired into a separate image item.

-parameters

-param lFlags [in]

Currently unused. Should be set to zero.

-param pInputStream [in, optional]

Specifies a pointer to the IStream preview image.

-param pWiaItem2 [in, optional]

Specifies a pointer to the IWiaItem2 item for which pInputStream was acquired. The segmentation filter creates child items for this item.

-returns

Returns S_OK if successful, or a standard COM error value otherwise.

-remarks

This method determines the subregions of the image represented by pInputStream. For each subregion that it detects, it creates a child item for the IWiaItem2] item pointed to by the pWiaItem2 parameter. For each child item, the segmentation filter must set values for the bounding rectangle of the area to scan, using the following WIA scanner item properties:

WIA_IPS_XPOS

WIA_IPS_YPOS

WIA_IPS_XEXTENT

WIA_IPS_YEXTENT

A more advanced filter might also require other scanner item properties, such as WIA_IPS_DESKEW_X and WIA_IPS_DESKEW_Y, if the driver supports deskewing.

If an application calls IWiaSegmentationFilter::DetectRegions more than once, the application must first delete the child items created by the last call to the IWiaSegmentationFilter::DetectRegions method.

If an application changes any properties into pWiaItem2, between acquiring the image into pInputStream and its call to IWiaSegmentationFilter::DetectRegions, the original property settings (the property settings the item had when the stream was acquired) must be restored. This can be done using IWiaPropertyStorage::GetPropertyStream and IWiaPropertyStorage::SetPropertyStream.

The application must reset the IStream preview if its call passes the same stream into the segmentation filter more than once. The application must also reset the stream after the initial download and before calling IWiaSegmentationFilter::DetectRegions.

-see-also

IStream

IWiaItem2

IWiaPropertyStorage