PlusLib
2.9.0
Software library for tracked ultrasound image acquisition, calibration, and processing.
|
#include <src/PlusCalibration/PatternLocAlgo/PlusFidSegmentation.h>
Public Types | |
enum | FiducialGeometryType { CALIBRATION_PHANTOM_MULTI_NWIRE, CIRS_PHANTOM_13_POINT, CALIBRATION_PHANTOM_6_POINT } |
typedef unsigned char | PixelType |
Static Public Member Functions | |
static void | SetDefaultSegmentationParameters (vtkXMLDataElement *segmentationElement) |
static void | WritePng (PlusFidSegmentation::PixelType *modifiedImage, std::string outImageName, int cols, int rows) |
Static Public Attributes | |
static const double | DEFAULT_ANGLE_TOLERANCE_DEGREES = 10.0 |
static const double | DEFAULT_APPROXIMATE_SPACING_MM_PER_PIXEL = 0.078 |
static const int | DEFAULT_CLIP_ORIGIN [2] = { 27, 27 } |
static const int | DEFAULT_CLIP_SIZE [2] = { 766, 562 } |
static const double | DEFAULT_COLLINEAR_POINTS_MAX_DISTANCE_FROM_LINE_MM = 0.6 |
static const double | DEFAULT_MAX_ANGLE_DIFFERENCE_DEGREES = 10.0 |
static const double | DEFAULT_MAX_LINE_PAIR_DISTANCE_ERROR_PERCENT = 10.0 |
static const double | DEFAULT_MAX_LINE_SHIFT_MM = 10.0 |
static const double | DEFAULT_MAX_THETA_DEGREES = 70.0 |
static const double | DEFAULT_MIN_THETA_DEGREES = -70.0 |
static const double | DEFAULT_MORPHOLOGICAL_OPENING_BAR_SIZE_MM = 2.0 |
static const double | DEFAULT_MORPHOLOGICAL_OPENING_CIRCLE_RADIUS_MM = 0.27 |
static const int | DEFAULT_NUMBER_OF_MAXIMUM_FIDUCIAL_POINT_CANDIDATES = 20 |
static const double | DEFAULT_THRESHOLD_IMAGE_PERCENT = 10.0 |
static const char * | DEFAULT_USE_ORIGINAL_IMAGE_INTENSITY_FOR_DOT_INTENSITY_SCORE = "FALSE" |
Definition at line 41 of file PlusFidSegmentation.h.
typedef unsigned char PlusFidSegmentation::PixelType |
Definition at line 60 of file PlusFidSegmentation.h.
The different types of phantom the algorithm covers
Enumerator | |
---|---|
CALIBRATION_PHANTOM_MULTI_NWIRE | |
CIRS_PHANTOM_13_POINT | |
CALIBRATION_PHANTOM_6_POINT |
Definition at line 63 of file PlusFidSegmentation.h.
PlusFidSegmentation::PlusFidSegmentation | ( | ) |
Definition at line 44 of file PlusFidSegmentation.cxx.
|
virtual |
Definition at line 94 of file PlusFidSegmentation.cxx.
|
inline |
Accept a dot as a possible fiducial
Definition at line 1275 of file PlusFidSegmentation.cxx.
void PlusFidSegmentation::Clear | ( | ) |
Clear the member variables
Definition at line 283 of file PlusFidSegmentation.cxx.
bool PlusFidSegmentation::Cluster | ( | bool & | tooManyCandidates | ) |
Cluster the dots. Returns true on success. If tooManyCandidates is true then the maximum limit of clusters are reached and so not all clusters are computed.
Definition at line 1294 of file PlusFidSegmentation.cxx.
|
inline |
Add neighbors to the cluster
Definition at line 1256 of file PlusFidSegmentation.cxx.
void PlusFidSegmentation::Dilate0 | ( | PlusFidSegmentation::PixelType * | dest, |
PlusFidSegmentation::PixelType * | image | ||
) |
Definition at line 636 of file PlusFidSegmentation.cxx.
void PlusFidSegmentation::Dilate135 | ( | PlusFidSegmentation::PixelType * | dest, |
PlusFidSegmentation::PixelType * | image | ||
) |
Definition at line 819 of file PlusFidSegmentation.cxx.
void PlusFidSegmentation::Dilate45 | ( | PlusFidSegmentation::PixelType * | dest, |
PlusFidSegmentation::PixelType * | image | ||
) |
Definition at line 698 of file PlusFidSegmentation.cxx.
void PlusFidSegmentation::Dilate90 | ( | PlusFidSegmentation::PixelType * | dest, |
PlusFidSegmentation::PixelType * | image | ||
) |
Definition at line 769 of file PlusFidSegmentation.cxx.
void PlusFidSegmentation::DilateCircle | ( | PlusFidSegmentation::PixelType * | dest, |
PlusFidSegmentation::PixelType * | image | ||
) |
Definition at line 889 of file PlusFidSegmentation.cxx.
|
inline |
Definition at line 869 of file PlusFidSegmentation.cxx.
|
inline |
Definition at line 614 of file PlusFidSegmentation.cxx.
|
inline |
Definition at line 798 of file PlusFidSegmentation.cxx.
|
inline |
Definition at line 667 of file PlusFidSegmentation.cxx.
|
inline |
Definition at line 748 of file PlusFidSegmentation.cxx.
void PlusFidSegmentation::Erode0 | ( | PlusFidSegmentation::PixelType * | dest, |
PlusFidSegmentation::PixelType * | image | ||
) |
Definition at line 329 of file PlusFidSegmentation.cxx.
void PlusFidSegmentation::Erode135 | ( | PlusFidSegmentation::PixelType * | dest, |
PlusFidSegmentation::PixelType * | image | ||
) |
Definition at line 522 of file PlusFidSegmentation.cxx.
void PlusFidSegmentation::Erode45 | ( | PlusFidSegmentation::PixelType * | dest, |
PlusFidSegmentation::PixelType * | image | ||
) |
Definition at line 387 of file PlusFidSegmentation.cxx.
void PlusFidSegmentation::Erode90 | ( | PlusFidSegmentation::PixelType * | dest, |
PlusFidSegmentation::PixelType * | image | ||
) |
Definition at line 466 of file PlusFidSegmentation.cxx.
void PlusFidSegmentation::ErodeCircle | ( | PlusFidSegmentation::PixelType * | dest, |
PlusFidSegmentation::PixelType * | image | ||
) |
Definition at line 577 of file PlusFidSegmentation.cxx.
|
inline |
Morphological operations performed by the algorithm
Definition at line 302 of file PlusFidSegmentation.cxx.
|
inline |
Definition at line 497 of file PlusFidSegmentation.cxx.
|
inline |
Definition at line 361 of file PlusFidSegmentation.cxx.
|
inline |
Definition at line 441 of file PlusFidSegmentation.cxx.
|
inline |
Set the dots that are considered candidates
Definition at line 184 of file PlusFidSegmentation.h.
|
inline |
Get the debug output value, if true more debug information are provided but the speed is lower
Definition at line 166 of file PlusFidSegmentation.h.
|
inline |
Get the vector that contains all the dots that have been segmented
Definition at line 178 of file PlusFidSegmentation.h.
|
inline |
Get the geometry type of the phantom, so far only the 6 points NWires and the CIRS phantom model 45 are supported
Definition at line 190 of file PlusFidSegmentation.h.
|
inline |
Get the size of the frame as an array
Definition at line 175 of file PlusFidSegmentation.h.
unsigned int PlusFidSegmentation::GetMorphologicalOpeningBarSizePx | ( | ) |
Get the size of the bar for the morphological operations
Definition at line 293 of file PlusFidSegmentation.cxx.
void PlusFidSegmentation::GetRegionOfInterest | ( | unsigned int & | xMin, |
unsigned int & | yMin, | ||
unsigned int & | xMax, | ||
unsigned int & | yMax | ||
) |
Validates the region of interest that was set for the image and returns it
Definition at line 1595 of file PlusFidSegmentation.cxx.
|
inline |
Get the threshold of the image, this is a percent value
Definition at line 163 of file PlusFidSegmentation.h.
|
inline |
Get the unaltered copy of the image
Definition at line 196 of file PlusFidSegmentation.h.
|
inline |
Get the working copy of the image
Definition at line 193 of file PlusFidSegmentation.h.
void PlusFidSegmentation::MorphologicalOperations | ( | ) |
Perform the morphological operations on the image
Definition at line 1394 of file PlusFidSegmentation.cxx.
PlusStatus PlusFidSegmentation::ReadConfiguration | ( | vtkXMLDataElement * | rootConfigElement | ) |
Definition at line 128 of file PlusFidSegmentation.cxx.
|
inline |
Set the Approximate spacing, this is in Mm per pixel
Definition at line 199 of file PlusFidSegmentation.h.
|
inline |
Get the dots that are considered candidates
Definition at line 181 of file PlusFidSegmentation.h.
|
inline |
Set the debug output value, if true more debug information are provided but the speed is lower
Definition at line 169 of file PlusFidSegmentation.h.
|
static |
Utility function to set parameters in segmentation XML data element to default values
Definition at line 1054 of file PlusFidSegmentation.cxx.
void PlusFidSegmentation::SetFiducialGeometry | ( | FiducialGeometryType | geometryType | ) |
Definition at line 1610 of file PlusFidSegmentation.cxx.
void PlusFidSegmentation::SetFrameSize | ( | const FrameSizeType & | frameSize | ) |
Set the Frame Size of the image
Definition at line 217 of file PlusFidSegmentation.cxx.
|
inline |
Set the size in Mm of the opening bar needed for the morphological operations
Definition at line 205 of file PlusFidSegmentation.h.
|
inline |
Set the radius of the opening circle needed for the morphological operations
Definition at line 202 of file PlusFidSegmentation.h.
void PlusFidSegmentation::SetNumberOfMaximumFiducialPointCandidates | ( | int | aValue | ) |
Set the maximum number of candidates to generate
Definition at line 1604 of file PlusFidSegmentation.cxx.
|
inline |
Set the possible fiducials Image file name
Definition at line 160 of file PlusFidSegmentation.h.
void PlusFidSegmentation::SetRegionOfInterest | ( | unsigned int | xMin, |
unsigned int | yMin, | ||
unsigned int | xMax, | ||
unsigned int | yMax | ||
) |
Set the region of interest in the image
Definition at line 1504 of file PlusFidSegmentation.cxx.
|
inline |
Set the threshold of the image, this is a percent value
Definition at line 214 of file PlusFidSegmentation.h.
|
inline |
Set to true to use the original image intensity for the dots intensity values
Definition at line 217 of file PlusFidSegmentation.h.
bool PlusFidSegmentation::ShapeContains | ( | std::vector< PlusCoordinate2D > & | shape, |
PlusCoordinate2D | point | ||
) |
Check if shape (structuring element) contains the new element (a point)
Definition at line 976 of file PlusFidSegmentation.cxx.
void PlusFidSegmentation::Subtract | ( | PlusFidSegmentation::PixelType * | image, |
PlusFidSegmentation::PixelType * | vals | ||
) |
Definition at line 1192 of file PlusFidSegmentation.cxx.
void PlusFidSegmentation::Suppress | ( | PlusFidSegmentation::PixelType * | image, |
double | percent_thresh | ||
) |
Suppress unwanted parts of the image
Definition at line 1210 of file PlusFidSegmentation.cxx.
void PlusFidSegmentation::UpdateParameters | ( | ) |
Update the parameters, especially the circle need for morphological operations
Definition at line 104 of file PlusFidSegmentation.cxx.
void PlusFidSegmentation::ValidateRegionOfInterest | ( | ) |
Check and modify if necessary the region of interest
Definition at line 1528 of file PlusFidSegmentation.cxx.
|
static |
Utility function to write image to file
Definition at line 992 of file PlusFidSegmentation.cxx.
void PlusFidSegmentation::WritePossibleFiducialOverlayImage | ( | const std::vector< std::vector< double > > & | fiducials, |
PlusFidSegmentation::PixelType * | unalteredImage, | ||
const char * | namePrefix, | ||
int | frameIndex | ||
) |
Write image with the selected points on it to an image file (possibleFiducialsNNN.bmp)
fiducials | position of fiducial points |
unalteredImage | original image |
namePrefix | prefix used for image file name generation |
frameIndex | frame index (used for generating the file name) |
Definition at line 1176 of file PlusFidSegmentation.cxx.
void PlusFidSegmentation::WritePossibleFiducialOverlayImage | ( | const std::vector< PlusFidDot > & | fiducials, |
PlusFidSegmentation::PixelType * | unalteredImage, | ||
const char * | namePrefix, | ||
int | frameIndex | ||
) |
Write image with the selected points on it to an image file (possibleFiducialsNNN.bmp)
fiducials | position of fiducial points |
unalteredImage | original image |
namePrefix | prefix used for image file name generation |
frameIndex | frame index (used for generating the file name) |
Definition at line 1089 of file PlusFidSegmentation.cxx.
|
static |
Definition at line 50 of file PlusFidSegmentation.h.
|
static |
Definition at line 44 of file PlusFidSegmentation.h.
|
static |
Definition at line 47 of file PlusFidSegmentation.h.
|
static |
Definition at line 48 of file PlusFidSegmentation.h.
|
static |
Definition at line 56 of file PlusFidSegmentation.h.
|
static |
Definition at line 51 of file PlusFidSegmentation.h.
|
static |
Definition at line 49 of file PlusFidSegmentation.h.
|
static |
Definition at line 54 of file PlusFidSegmentation.h.
|
static |
Definition at line 53 of file PlusFidSegmentation.h.
|
static |
Definition at line 52 of file PlusFidSegmentation.h.
|
static |
Definition at line 46 of file PlusFidSegmentation.h.
|
static |
Definition at line 45 of file PlusFidSegmentation.h.
|
static |
Definition at line 58 of file PlusFidSegmentation.h.
|
static |
Definition at line 55 of file PlusFidSegmentation.h.
|
static |
Definition at line 57 of file PlusFidSegmentation.h.
|
protected |
Definition at line 238 of file PlusFidSegmentation.h.
|
protected |
Pointer to the fiducial candidates coordinates
Definition at line 254 of file PlusFidSegmentation.h.
|
protected |
Definition at line 263 of file PlusFidSegmentation.h.
|
protected |
Definition at line 257 of file PlusFidSegmentation.h.
|
protected |
True if the dots are found, false otherwise.
Definition at line 245 of file PlusFidSegmentation.h.
|
protected |
Definition at line 261 of file PlusFidSegmentation.h.
|
protected |
Definition at line 258 of file PlusFidSegmentation.h.
|
protected |
Definition at line 234 of file PlusFidSegmentation.h.
|
protected |
X and Y values of found dots.
Definition at line 248 of file PlusFidSegmentation.h.
|
protected |
Definition at line 217 of file PlusFidSegmentation.h.
|
protected |
Definition at line 240 of file PlusFidSegmentation.h.
|
protected |
Definition at line 241 of file PlusFidSegmentation.h.
|
protected |
Definition at line 239 of file PlusFidSegmentation.h.
|
protected |
Definition at line 242 of file PlusFidSegmentation.h.
|
protected |
Definition at line 236 of file PlusFidSegmentation.h.
|
protected |
Definition at line 229 of file PlusFidSegmentation.h.
|
protected |
Definition at line 230 of file PlusFidSegmentation.h.
|
protected |
Definition at line 224 of file PlusFidSegmentation.h.
|
protected |
Number of possible fiducial points
Definition at line 251 of file PlusFidSegmentation.h.
|
protected |
Definition at line 232 of file PlusFidSegmentation.h.
|
protected |
Definition at line 221 of file PlusFidSegmentation.h.
|
protected |
Segmentation threshold (in percentage, minimum is 0, maximum is 100)
Definition at line 227 of file PlusFidSegmentation.h.
|
protected |
Definition at line 259 of file PlusFidSegmentation.h.
|
protected |
Definition at line 222 of file PlusFidSegmentation.h.
|
protected |
Definition at line 256 of file PlusFidSegmentation.h.