#include "SimplePixelImage.h"
#include "MedianFilter.h"
#include "AllocMem.h"
Go to the source code of this file.
Classes | |
struct | _FilesOptions |
Files information: paths, names and saving options. More... | |
struct | _OutputOptions |
Holds all options on which where and how data should be output. More... | |
struct | _PointDouble |
Position of a pixel in double format. More... | |
struct | _SegmentationOptions |
Possible options of image segmentation. More... | |
struct | _SegmentationParameters |
Parameters used in the segmentation algorithm. More... | |
struct | _SpotStatistics |
Characteristic properties of a spot. More... | |
Define output options | |
#define | DECIMAL_POSITIONS 4 |
#define | EXTREME_SPOTS_DISOLVING false |
#define | EXTREME_SPOTS_SHADING false |
#define | PRINT_FILE_MEDIAN true |
Activates file output of median filtered image. | |
#define | PRINT_FILE_SEGMENTED true |
Activates file output of segmented image. | |
#define | PRINT_FILE_STATISTICS true |
hello Activates file output of spots statistics | |
#define | SPOTS_MARKING false |
Define segmentation options | |
#define | FRAME_TYPE FRAME_UNCHANGED |
#define | K_DEFAULT 0.5 |
#define | MAX_AREA_DEFAULT 5000.0 |
#define | MIN_AREA_DEFAULT 100.0 |
#define | PERFORM_MEDIAN_FILTER false |
#define | SEGMENTATION_METRIC METRIC_TONE |
Defines | |
#define | KEEP_ORIGINAL_PATH true |
Do not modify this value. | |
#define | OUTPUT_PATH "" |
When KEEP_ORIGINAL_PATH is set to false , this path is where the output is saved. | |
Typedefs | |
typedef enum _FileName | FileName |
Enumeration of the output files. | |
typedef _FilesOptions | FilesOptions |
Files information: paths, names and saving options. | |
typedef _OutputOptions | OutputOptions |
Holds all options on which where and how data should be output. | |
typedef enum _PixelMetric | PixelMetric |
Enumeration of the metrics that can be used to evaluate pixels distance. | |
typedef _PointDouble | PointDouble |
Position of a pixel in double format. | |
typedef _SegmentationOptions | SegmentationOptions |
Possible options of image segmentation. | |
typedef _SegmentationParameters | SegmentationParameters |
Parameters used in the segmentation algorithm. | |
typedef _SpotStatistics | SpotStatistics |
Characteristic properties of a spot. | |
Enumerations | |
enum | _FileName { SOURCE_FILE, IMAGE_NAME, MEDIAN_FILE, SEGMENTED_FILE, SPOT_STATISTICS_FILE, FILES_NUMBER } |
Enumeration of the output files. More... | |
enum | _PixelMetric { METRIC_EUCLIDEAN, METRIC_TONE, METRIC_HUE, METRICS_NUMBER } |
Enumeration of the metrics that can be used to evaluate pixels distance. More... | |
Functions | |
void | allocateFilesList (char **&filesList) |
void | copyImageBW (PixelPlane final, PixelPlane initial, int rows, int cols) |
Copies the pixels in initial PixelPlane into final. | |
void | copyImageColour (PixelPlane finalr, PixelPlane finalg, PixelPlane finalb, PixelPlane initialr, PixelPlane initialg, PixelPlane initialb, int rows, int cols) |
void | freeFilesList (char **fileslist) |
Frees memory allocated by allocateFilesList. | |
void | generateFileNames (char *filesList[], SegmentationParameters &parms) |
Generates the names of the output files. | |
void | getArgumentsFromUser (int argc, char *argv[], SegmentationParameters &parms, char *filesList[]) |
Stores the program arguments in their respective variables. | |
void | initializeOptionsViaDefine (SegmentationOptions &segmentation, OutputOptions &output) |
Initialize all options needed via data supplied through #DEFINES. | |
size_t | segmentSimplePixelImage (SimplePixelImage const &inputImage, int *(**iSpotPixels), SegmentationOptions const &options, SpotStatistics *(*sSegmentationStatistics), FilesOptions const &files) |
Segments a Simple Pixel Image according to the SegmentationOptions. |
The items included in this header are:
|
Decimal positions of parameter K written on the file name of the segmented image.
|
|
Do not modify this value.
|
|
Activates file output of median filtered image. Setting values:
|
|
Activates file output of segmented image. Setting values:
|
|
hello Activates file output of spots statistics Setting values:
|
|
Enumeration of the output files. The variables of this enumeration, are used to hold the position of the strings stored in _FilesOptions.
|
|
Files information: paths, names and saving options.
|
|
Holds all options on which where and how data should be output. Which and where data should be output by file is the information held on the record files. The rest of records are intended to supply the most user's suitable appearance of the segmentation.
|
|
Enumeration of the metrics that can be used to evaluate pixels distance.
Each of these metrics returns, for a pair of pixels,a real value in the range
|
|
Possible options of image segmentation. The segmentation options can be roughly gathered in 3 different groups:
|
|
Enumeration of the output files. The variables of this enumeration, are used to hold the position of the strings stored in _FilesOptions.
|
|
Enumeration of the metrics that can be used to evaluate pixels distance.
Each of these metrics returns, for a pair of pixels,a real value in the range
|
|
Allocates memory for files List and initializes them with the '\0' character |
|
Copies each PixelPlane into the corresponding one. that is: copies initialr into finalr, initialg into finalg, and so on. |
|
Generates the names of the output files.
From the full file name (path+name) -stored in SOURCE_FILE position of filesList- this function generates the rest of files names and stores them in filesList.
|
|
Stores the program arguments in their respective variables. These arguments must be introduced in the following order: Obligatory
Optional |
|
Initialize all options needed via data supplied through #DEFINES.
|
|
Segments a Simple Pixel Image according to the SegmentationOptions.
|