Package cz.vutbr.fit.layout.vips.impl
Class VisualBlockDetector
- java.lang.Object
-
- cz.vutbr.fit.layout.vips.impl.VisualBlockDetector
-
public class VisualBlockDetector extends Object
Detects the visual blocks in the page.- Author:
- Tomas Popela, burgetr
-
-
Constructor Summary
Constructors Constructor Description VisualBlockDetector(VisualArea rootArea)
Creates a detector for the given root visual area.VisualBlockDetector(VisualArea rootArea, int sizeTresholdWidth, int sizeTresholdHeight)
Creates a new detector with the specified thresholds.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getSizeTresholdHeight()
int
getSizeTresholdWidth()
List<VisualBlock>
getVisualBlocks()
Selects all the extracted blocks from the tree of blocks.void
parse()
Creates the VIPS block trees and identifies the visual blocks.void
setSizeTresholdHeight(int sizeTresholdHeight)
void
setSizeTresholdWidth(int sizeTresholdWidth)
-
-
-
Constructor Detail
-
VisualBlockDetector
public VisualBlockDetector(VisualArea rootArea)
Creates a detector for the given root visual area.- Parameters:
rootArea
- the root visual area to create detector for.
-
VisualBlockDetector
public VisualBlockDetector(VisualArea rootArea, int sizeTresholdWidth, int sizeTresholdHeight)
Creates a new detector with the specified thresholds.- Parameters:
rootArea
- the root visual area to create detector for.sizeTresholdWidth
- Element's width tresholdsizeTresholdHeight
- Element's height treshold
-
-
Method Detail
-
parse
public void parse()
Creates the VIPS block trees and identifies the visual blocks.
-
getVisualBlocks
public List<VisualBlock> getVisualBlocks()
Selects all the extracted blocks from the tree of blocks.- Returns:
- a list of extracted blocks
-
getSizeTresholdWidth
public int getSizeTresholdWidth()
- Returns:
- the _sizeTresholdWidth
-
setSizeTresholdWidth
public void setSizeTresholdWidth(int sizeTresholdWidth)
- Parameters:
sizeTresholdWidth
- the _sizeTresholdWidth to set
-
getSizeTresholdHeight
public int getSizeTresholdHeight()
- Returns:
- the _sizeTresholdHeight
-
setSizeTresholdHeight
public void setSizeTresholdHeight(int sizeTresholdHeight)
- Parameters:
sizeTresholdHeight
- the _sizeTresholdHeight to set
-
-