7 #ifndef _FIDUCIAL_SEGMENTATION_H 8 #define _FIDUCIAL_SEGMENTATION_H 11 #include "PlusConfigure.h" 12 #include "vtkXMLDataElement.h" 47 static const int DEFAULT_CLIP_ORIGIN[2];
48 static const int DEFAULT_CLIP_SIZE[2];
67 CALIBRATION_PHANTOM_6_POINT
74 PlusStatus ReadConfiguration(vtkXMLDataElement* rootConfigElement);
77 void SetFrameSize(
const FrameSizeType& frameSize);
78 void SetFiducialGeometry(FiducialGeometryType geometryType);
81 void UpdateParameters();
87 void ValidateRegionOfInterest();
118 void WritePossibleFiducialOverlayImage(
const std::vector< std::vector<double> >& fiducials,
PlusFidSegmentation::PixelType* unalteredImage,
const char* namePrefix,
int frameIndex);
127 void WritePossibleFiducialOverlayImage(
const std::vector<PlusFidDot>& fiducials,
PlusFidSegmentation::PixelType* unalteredImage,
const char* namePrefix,
int frameIndex);
130 void MorphologicalOperations();
143 bool Cluster(
bool& tooManyCandidates);
149 static void SetDefaultSegmentationParameters(vtkXMLDataElement* segmentationElement);
152 bool ShapeContains(std::vector<PlusCoordinate2D>& shape,
PlusCoordinate2D point);
155 inline void ClusteringAddNeighbors(
PlusFidSegmentation::PixelType* image,
int r,
int c, std::vector<PlusFidDot>& m_Test, std::vector<PlusFidDot>& m_Set, std::vector<PlusFidSegmentation::PixelType>& m_Vals);
172 unsigned int GetMorphologicalOpeningBarSizePx();
187 void SetNumberOfMaximumFiducialPointCandidates(
int aValue);
208 void SetRegionOfInterest(
unsigned int xMin,
unsigned int yMin,
unsigned int xMax,
unsigned int yMax);
211 void GetRegionOfInterest(
unsigned int& xMin,
unsigned int& yMin,
unsigned int& xMax,
unsigned int& yMax);
220 FrameSizeType m_FrameSize;
239 double m_ImageScalingTolerancePercent[4];
240 double m_ImageNormalVectorInPhantomFrameEstimation[3];
241 double m_ImageNormalVectorInPhantomFrameMaximumRotationAngleDeg[6];
242 double m_ImageToPhantomTransform[16];
266 #endif // _FIDUCIAL_SEGMENTATION_H
FiducialGeometryType GetFiducialGeometry()
unsigned int m_NumberOfMaximumFiducialPointCandidates
void SetMorphologicalOpeningBarSizeMm(double value)
static const double DEFAULT_MAX_ANGLE_DIFFERENCE_DEGREES
PlusFidSegmentation::PixelType * m_Dilated
void SetPossibleFiducialsImageFilename(std::string value)
std::vector< PlusFidDot > m_DotsVector
static const double DEFAULT_THRESHOLD_IMAGE_PERCENT
double m_MorphologicalOpeningCircleRadiusMm
void SetUseOriginalImageIntensityForDotIntensityScore(bool value)
void SetMorphologicalOpeningCircleRadiusMm(double value)
PlusFidSegmentation::PixelType * GetUnalteredImage()
std::string m_PossibleFiducialsImageFilename
static const double DEFAULT_MAX_LINE_PAIR_DISTANCE_ERROR_PERCENT
static const double DEFAULT_MORPHOLOGICAL_OPENING_CIRCLE_RADIUS_MM
std::array< unsigned int, 4 > m_RegionOfInterest
PlusFidSegmentation::PixelType * m_UnalteredImage
static const double DEFAULT_MAX_LINE_SHIFT_MM
void SetThresholdImagePercent(double value)
bool m_UseOriginalImageIntensityForDotIntensityScore
double GetThresholdImagePercent()
void SetApproximateSpacingMmPerPixel(double value)
static const double DEFAULT_APPROXIMATE_SPACING_MM_PER_PIXEL
static const double DEFAULT_ANGLE_TOLERANCE_DEGREES
static const double DEFAULT_COLLINEAR_POINTS_MAX_DISTANCE_FROM_LINE_MM
void SetDebugOutput(bool value)
std::vector< PlusFidDot > & GetCandidateFidValues()
std::vector< std::vector< double > > m_FoundDotsCoordinateValue
std::vector< PlusCoordinate2D > m_MorphologicalCircle
const char const char * value
static const int DEFAULT_NUMBER_OF_MAXIMUM_FIDUCIAL_POINT_CANDIDATES
static const double DEFAULT_MAX_THETA_DEGREES
static const double DEFAULT_MORPHOLOGICAL_OPENING_BAR_SIZE_MM
FiducialGeometryType m_FiducialGeometry
Direction vectors of rods y
PlusCoordinate2D(int y, int x)
static const char * DEFAULT_USE_ORIGINAL_IMAGE_INTENSITY_FOR_DOT_INTENSITY_SCORE
void SetCandidateFidValues(const std::vector< PlusFidDot > &value)
PlusFidSegmentation::PixelType * GetWorking()
static const double DEFAULT_MIN_THETA_DEGREES
double m_MorphologicalOpeningBarSizeMm
std::vector< PlusFidDot > & GetDotsVector()
double m_ApproximateSpacingMmPerPixel
PlusFidSegmentation::PixelType * m_Eroded
double m_ThresholdImagePercent
FrameSizeType GetFrameSize()
std::vector< PlusFidDot > m_CandidateFidValues
PlusFidSegmentation::PixelType * m_Working