BatchProcessing This example demonstrates how to use the
SbFileHelper class in order to launch a batch image processing chain.
DESCRIPTION:
Once an image processing chain has been validated on a set of representative samples it can be useful to apply the same workflow on a stack of images located in a same folder.
This example shows how to apply a gradient operator on a list of images and save the result in a new file.
-
A list of every TIFF files located in a given directory is defined (/ImageViz/Data).
-
Each image is loaded.
-
A Sobel gradient operator is applied on each input image.
-
The output data is converted to 8 bits type (the gradient output of an 8 bits image is a 16 bits image).
-
The result image is saved in another directory (the current directory).
NOTE:
-
If the convert step is not applied the workflow will correctly work but the output image could appear black in a standard viewer.
-
A more complex workflow can be implemented inside the loop from the pre-processing step to the computation of quantification results.
-
The result of a quantification can be accessed as shown in the Label analysis example and can then be easily written in a text output, like a csv file.
SEE ALSO
SbFileHelper, SoFileDataAdapter, SoGradientOperatorProcessing2d, SoConvertImageProcessing
SCREENSHOT:
FILES:
-
ImageViz/GettingStarted/04.4.BatchProcessing.cxx