8 #include "iPenaltyMarkovRandomField.hh" 109 cout <<
"The Markov Random Field (MRF) penalty is implemented for several types of neighborhood, potential functions," << endl;
110 cout <<
"similarity and proximity factors. All these parameters are described below, and a template configuration file" << endl;
111 cout <<
"for parameters selection can be found in the configuration folder (config/optimizer/MRF.conf). The configuration" << endl;
112 cout <<
"of this penalty can only be done through a configuration file. It is not possible to parameterize it directly" << endl;
113 cout <<
"from the command line. The MRF penalty has the following expression:" << endl;
114 cout <<
"penalty = beta * sum_on_voxels * sum_on_neighborhood * proximity_factor * similarity_factor * potential_function" << endl;
115 cout <<
"------------" << endl;
116 cout <<
"Neighborhood" << endl;
117 cout <<
"------------" << endl;
118 cout <<
"The neighborhood is set by the 'neighborhood shape' keyword and can be described using one of the following setting:" << endl;
119 cout <<
"[6-nearest]: Consider the 6 nearest neighbors, i.e. 2 along each dimension. In 2D, only 4 in the plane are used." << endl;
120 cout <<
"[box]: Consider all voxels included in a box centered on the voxel of interest. The size of the box is parameterized" << endl;
121 cout <<
" using the 'box neighborhood order' keyword. The side of the box is equal to '2*order+1'. The 8 corner voxels" << endl;
122 cout <<
" can also be excluded from the neighborhood by setting the 'exclude box neighborhood corners' keyword to 1." << endl;
123 cout <<
"[sphere]: Consider all voxels whose center is included in a sphere centered on the voxel of interest and of radius" << endl;
124 cout <<
" provided by the 'sphere neighborhood radius (mm)' keyword." << endl;
125 cout <<
"-----------------" << endl;
126 cout <<
"Proximity factors" << endl;
127 cout <<
"-----------------" << endl;
128 cout <<
"The proximity factors are used to weight the contribution of each neighbor to the global penalty, based on proximity to the" << endl;
129 cout <<
"voxel of interest. These factors are always normalized so that their sum is 1. They can be set using the 'proximity factor'" << endl;
130 cout <<
"keyword based on one of the following setting:" << endl;
131 cout <<
"[none]: Consider uniform proximity factors." << endl;
132 cout <<
"[voxel]: Consider factors inversely proportional to the distance in voxels from the voxel of interest (i.e. the unit" << endl;
133 cout <<
" is voxels, whatever the axis and the voxel dimensions)." << endl;
134 cout <<
"[euclidian]: Consider factors inversely proportional to the euclidian distance from the voxel of interest (i.e. the unit" << endl;
135 cout <<
" is mm)." << endl;
136 cout <<
"[gaussian]: Consider factors following a Gaussian distribution of provided FWHM." << endl;
137 cout <<
" The FWHM of the Gaussian can be set in mm using the 'proxFWHM (mm)' keyword." << endl;
139 cout <<
"------------------" << endl;
140 cout <<
"Similarity factors" << endl;
141 cout <<
"------------------" << endl;
142 cout <<
"The similarity factors are used to weight the contribution of each neighbor to the global penalty, based on similarity to the" << endl;
143 cout <<
"voxel of interest. These factors are not normalized by default. They can be set using the 'similarity factor' keyword based on" << endl;
144 cout <<
"one of the following setting:" << endl;
145 cout <<
"[none]: Consider uniform similarity factors, i.e. the value of 1 for each voxel in the neighborhood." << endl;
146 cout <<
"[aBowsher]: Consider similarity factors based on the asymmetrical Bowsher's method and an additional image. The additional" << endl;
147 cout <<
" image must be provided using the '-multimodal' option in the command line. Based on additional image values," << endl;
148 cout <<
" voxels of the neighborhood most similar to the voxel of interest will have a similarity factor of 1, and the" << endl;
149 cout <<
" other voxels will have a similarity factor of 0. The number of most similar voxels is parameterized by a percentage" << endl;
150 cout <<
" of the number of voxels in the neighborhood, provided with the 'similarity threshold Bowsher (%)' keyword." << endl;
151 cout <<
" For an explanation of asymmetrical Bowsher, see Schramm et al, IEEE Trans. Med. Imaging, vol. 37, pp. 590, 2018." << endl;
152 cout <<
"-------------------" << endl;
153 cout <<
"Potential functions" << endl;
154 cout <<
"-------------------" << endl;
155 cout <<
"The potential function actually penalizes the difference between the voxel of interest and a neighbor. It can be set using the" << endl;
156 cout <<
"'potential function' keyword based on one of the following setting:" << endl;
157 cout <<
"[quadratic]: p(u,v) = 0.5*(u-v)^2" << endl;
158 cout <<
" Reference: Geman and Geman, IEEE Trans. Pattern Anal. Machine Intell., vol. PAMI-6, pp. 721-741, 1984." << endl;
159 cout <<
"[geman mcclure]: p(u,v,d) = (u-v)^2 / (d^2+(u-v)^2)" << endl;
160 cout <<
" The parameter 'd' can be set using the 'deltaGMC' keyword." << endl;
161 cout <<
" Reference: Geman and McClure, Proc. Amer. Statist. Assoc., 1985." << endl;
162 cout <<
"[hebert leahy]: p(u,v,m) = log(1+(u-v)^2/m^2)" << endl;
163 cout <<
" The parameter 'm' can be set using the 'muHL' keyword." << endl;
164 cout <<
" Reference: Hebert and Leahy, IEEE Trans. Med. Imaging, vol. 8, pp. 194-202, 1989." << endl;
165 cout <<
"[green logcosh]: p(u,v,d) = log(cosh((u-v)/d))" << endl;
166 cout <<
" The parameter 'd' can be set using the 'deltaLogCosh' keyword." << endl;
167 cout <<
" Reference: Green, IEEE Trans. Med. Imaging, vol. 9, pp. 84-93, 1990." << endl;
168 cout <<
"[huber piecewise]: " << endl;
169 cout <<
" p(u,v,d) = d*abs(u-v)-0.5*d^2 if abs(u-v) > d" << endl;
170 cout <<
" = 0.5*(u-v)^2 if abs(u-v) <= d" << endl;
171 cout <<
" The parameter 'd' can be set using the 'deltaHuber' keyword." << endl;
172 cout <<
" Reference: e.g. Mumcuoglu et al, Phys. Med. Biol., vol. 41, pp. 1777-1807, 1996." << endl;
173 cout <<
"[nuyts relative]: p(u,v,g) = (u-v)^2 / (u+v+g*abs(u-v))" << endl;
174 cout <<
" The parameter 'g' can be set using the 'gammaRD' keyword." << endl;
175 cout <<
" Reference: Nuyts et al, IEEE Trans. Nucl. Sci., vol. 49, pp. 56-60, 2002." << endl;
186 string key_word =
"";
191 key_word =
"neighborhood shape";
194 Cerr(
"***** iPenaltyMarkovRandomField::ReadConfigurationFile() -> Failed to get the '" << key_word <<
"' keyword !" << endl);
198 if (buffer ==
"sphere")
202 key_word =
"sphere neighborhood radius (mm)";
205 Cerr(
"***** iPenaltyMarkovRandomField::ReadConfigurationFile() -> Failed to get the '" << key_word <<
"' keyword !" << endl);
210 else if (buffer ==
"box")
214 key_word =
"box neighborhood order";
217 Cerr(
"***** iPenaltyMarkovRandomField::ReadConfigurationFile() -> Failed to get the '" << key_word <<
"' keyword !" << endl);
221 key_word =
"exclude box neighborhood corners";
224 Cerr(
"***** iPenaltyMarkovRandomField::ReadConfigurationFile() -> Failed to get the '" << key_word <<
"' keyword !" << endl);
229 else if (buffer ==
"6-nearest")
236 Cerr(
"***** iPenaltyMarkovRandomField::ReadConfigurationFile() -> Unknown neighborhood type '" << buffer <<
"' !" << endl);
243 key_word =
"proximity factor";
246 Cerr(
"***** iPenaltyMarkovRandomField::ReadConfigurationFile() -> Failed to get the '" << key_word <<
"' keyword !" << endl);
250 if (buffer ==
"voxel")
255 else if (buffer ==
"euclidian")
260 else if (buffer ==
"gaussian")
263 key_word =
"proxFWHM (mm)";
266 Cerr(
"***** iPenaltyMarkovRandomField::ReadConfigurationFile() -> Failed to get the '" << key_word <<
"' keyword !" << endl);
271 else if (buffer ==
"none")
278 Cerr(
"***** iPenaltyMarkovRandomField::ReadConfigurationFile() -> Unknown proximity factor type '" << buffer <<
"' !" << endl);
285 key_word =
"similarity factor";
288 Cerr(
"***** iPenaltyMarkovRandomField::ReadConfigurationFile() -> Failed to get the '" << key_word <<
"' keyword !" << endl);
292 if (buffer ==
"none")
297 else if (buffer ==
"aBowsher")
301 key_word =
"similarity threshold Bowsher (%)";
304 Cerr(
"***** iPenaltyMarkovRandomField::ReadConfigurationFile() -> Failed to get the '" << key_word <<
"' keyword !" << endl);
311 Cerr(
"***** iPenaltyMarkovRandomField::ReadConfigurationFile() -> Unknown similarity factor type '" << buffer <<
"' !" << endl);
318 key_word =
"potential function";
321 Cerr(
"***** iPenaltyMarkovRandomField::ReadConfigurationFile() -> Failed to get the '" << key_word <<
"' keyword !" << endl);
325 if (buffer ==
"quadratic")
331 else if (buffer ==
"nuyts relative")
335 key_word =
"gammaRD";
338 Cerr(
"***** iPenaltyMarkovRandomField::ReadConfigurationFile() -> Failed to get the '" << key_word <<
"' keyword !" << endl);
343 else if (buffer ==
"geman mcclure")
347 key_word =
"deltaGMC";
350 Cerr(
"***** iPenaltyMarkovRandomField::ReadConfigurationFile() -> Failed to get the '" << key_word <<
"' keyword !" << endl);
355 else if (buffer ==
"green logcosh")
359 key_word =
"deltaLogCosh";
362 Cerr(
"***** iPenaltyMarkovRandomField::ReadConfigurationFile() -> Failed to get the '" << key_word <<
"' keyword !" << endl);
367 else if (buffer ==
"hebert leahy")
374 Cerr(
"***** iPenaltyMarkovRandomField::ReadConfigurationFile() -> Failed to get the '" << key_word <<
"' keyword !" << endl);
379 else if (buffer ==
"huber piecewise")
383 key_word =
"deltaHuber";
386 Cerr(
"***** iPenaltyMarkovRandomField::ReadConfigurationFile() -> Failed to get the '" << key_word <<
"' keyword !" << endl);
393 Cerr(
"***** iPenaltyMarkovRandomField::ReadConfigurationFile() -> Unknown potential function '" << buffer <<
"' !" << endl);
409 Cerr(
"***** iPenaltyMarkovRandomField::ReadOptionsList() -> Options can be specified only using a configuration file !" << endl);
423 Cerr(
"***** iPenaltyMarkovRandomField::CheckSpecificParameters() -> Should provide a potential function type !" << endl);
429 Cerr(
"***** iPenaltyMarkovRandomField::CheckSpecificParameters() -> Should provide a proximity factor type !" << endl);
435 Cerr(
"***** iPenaltyMarkovRandomField::CheckSpecificParameters() -> Should provide a similarity factor type !" << endl);
441 Cerr(
"***** iPenaltyMarkovRandomField::CheckSpecificParameters() -> Should provide a neighborhood type !" << endl);
447 Cerr(
"***** iPenaltyMarkovRandomField::CheckSpecificParameters() -> Should provide a meaningful FWHM of the proximity factors Gaussian distrubtion (here: " <<
m_proximityGaussianFWHM <<
") !" << endl);
453 if (m_similarityBowsherThreshold<0. || m_similarityBowsherThreshold>100.)
455 Cerr(
"***** iPenaltyMarkovRandomField::CheckSpecificParameters() -> Provided threshold parameter for the Bowsher similarity " <<
m_similarityBowsherThreshold <<
" does not fall into [0,100]% !" << endl);
460 Cerr(
"***** iPenaltyMarkovRandomField::CheckSpecificParameters() -> Bowsher similarity requires a multimodal image !"<< endl);
465 Cout(
"***** iPenaltyMarkovRandomField::CheckSpecificParameters() -> Warning : More than one multimodal image, Bowsher similarity will use only the first one !"<< endl);
471 Cerr(
"***** iPenaltyMarkovRandomField::CheckSpecificParameters() -> Provided radius of the sphere neighborhood (" <<
m_neighborhoodSphereRadius <<
") is negative" << endl);
476 Cerr(
"***** iPenaltyMarkovRandomField::CheckSpecificParameters() -> Provided order of the box neighborhood (" <<
m_neighborhoodBoxOrder <<
") is negative" << endl);
482 Cerr(
"***** iPenaltyMarkovRandomField::CheckSpecificParameters() -> Provided gamma parameter of relative differences potential function must be positive or null !" << endl);
488 Cerr(
"***** iPenaltyMarkovRandomField::CheckSpecificParameters() -> Provided delta parameter of Geman and McClure's potential function must be strictly positive !" << endl);
494 Cerr(
"***** iPenaltyMarkovRandomField::CheckSpecificParameters() -> Provided delta parameter of Green's log-cosh potential function must be strictly positive !" << endl);
500 Cerr(
"***** iPenaltyMarkovRandomField::CheckSpecificParameters() -> Provided mu parameter of Hebert and Leahy's potential function must be strictly positive !" << endl);
506 Cerr(
"***** iPenaltyMarkovRandomField::CheckSpecificParameters() -> Provided delta parameter of Huber's piecewise potential function must be strictly positive !" << endl);
523 Cerr(
"***** iPenaltyMarkovRandomField::InitializeSpecific() -> Failed to build the neighborhood !" << endl);
529 Cerr(
"***** iPenaltyMarkovRandomField::InitializeSpecific() -> Failed to build the proximity factors !" << endl);
548 Cout(
"iPenaltyMarkovRandomField::InitializeSpecific() -> Use the MRF penalty" << endl);
554 Cout(
" --> shape of neighborhood: sphere" << endl);
559 Cout(
" --> shape of neighborhood: box" << endl);
565 Cout(
" --> shape of neighborhood: 6-nearest" << endl);
568 Cout(
" --> Max number of voxels in the neighborhood: " << m_neighborhoodMaxNbVoxels << endl);
574 Cout(
" --> proximity factor: uniform" << endl);
578 Cout(
" --> proximity factor: inverse of voxel distance (i.e. distance in numbers of voxels)" << endl);
582 Cout(
" --> proximity factor: inverse of euclidian distance" << endl);
586 Cout(
" --> proximity factor: gaussian distribution"<< endl);
593 Cout(
" --> similarity factor: uniform" << endl);
597 Cout(
" --> similarity factor: asymmetric Bowsher" << endl);
607 Cout(
" --> potential function: quadratic" << endl);
611 Cout(
" --> potential function: Nuyts relative differences 2002" << endl);
616 Cout(
" --> potential function: Geman and McClure 1985" << endl);
621 Cout(
" --> potential function: Green log-cosh 1990" << endl);
626 Cout(
" --> potential function: Hebert and Leahy 1989" << endl);
631 Cout(
" --> potential function: Huber piecewise linear-quadratic" << endl);
650 Cerr(
"***** iPenaltyMarkovRandomField::BuildNeighborhoodKernel() -> Neighborhood kernel has already been created !" << endl);
669 m_neighborhoodMaxNbVoxels = (radius_vox_x*2+1) * (radius_vox_y*2+1) * (radius_vox_z*2+1);
674 INTNB nb_voxels_in_neighborhood = 0;
676 for (
INTNB vox_z = -radius_vox_z; vox_z<=radius_vox_z; vox_z++)
677 for (
INTNB vox_y = -radius_vox_y; vox_y<=radius_vox_y; vox_y++)
678 for (
INTNB vox_x = -radius_vox_x; vox_x<=radius_vox_x; vox_x++)
680 if (vox_x!=0 || vox_y!=0 || vox_z!=0)
683 FLTNB squareDistance = ((
FLTNB)(vox_x*vox_x))*vox_size_x*vox_size_x
684 + ((
FLTNB)(vox_y*vox_y))*vox_size_y*vox_size_y
685 + ((
FLTNB)(vox_z*vox_z))*vox_size_z*vox_size_z;
692 nb_voxels_in_neighborhood++;
696 m_neighborhoodMaxNbVoxels = nb_voxels_in_neighborhood;
713 INTNB nb_voxels_in_neighborhood = 0;
715 for (
INTNB vox_z = -neighborhood_box_order_z; vox_z<=neighborhood_box_order_z; vox_z++)
719 if (vox_x!=0 || vox_y!=0 || vox_z!=0)
729 nb_voxels_in_neighborhood++;
733 m_neighborhoodMaxNbVoxels = nb_voxels_in_neighborhood;
742 m_neighborhoodMaxNbVoxels = 6;
765 Cerr(
"***** iPenaltyMarkovRandomField::BuildNeighborhoodKernel() -> The provided shape of neighborhood (" <<
m_neighborhoodShape <<
") is unknown !" << endl);
769 if (m_neighborhoodMaxNbVoxels<1)
771 Cerr(
"***** iPenaltyMarkovRandomField::BuildNeighborhoodKernel() -> There is no voxel in the neighborhood ! Check your neighborhood definition." << endl);
795 Cerr(
"***** iPenaltyMarkovRandomField::BuildProximityFactors() -> Proximity kernel has already been created somewhere else !" << endl);
800 Cerr(
"***** iPenaltyMarkovRandomField::BuildProximityFactors() -> Neighborhood kernel must have been created and initialized before !" << endl);
804 FLTNB proximity_factor_sum = 0.;
854 Cerr(
"***** iPenaltyMarkovRandomField::BuildProximityFactors() -> The provided type of proximity factor (" <<
m_proximityType <<
") is unknown !" << endl);
879 INTNB index_x = a_voxel % nb_vox_x;
880 INTNB index_y = (a_voxel/nb_vox_x) % nb_vox_y;
881 INTNB index_z = a_voxel / nb_vox_xy;
891 INTNB neighbor_xyz = neighbor_x + neighbor_y*nb_vox_x + neighbor_z*nb_vox_xy;
893 if ( neighbor_x>=0 && neighbor_x<nb_vox_x && neighbor_y>=0 && neighbor_y<nb_vox_y && neighbor_z>=0 && neighbor_z<nb_vox_z && !mp_ImageDimensionsAndQuantification->IsVoxelMasked(neighbor_xyz) )
934 if (im_i1 == -1)
return false;
935 if (im_i2 == -1)
return true;
948 Cerr(
"***** iPenaltyMarkovRandomField::ComputeSimilarityFactors() -> Unknown similarity type provided !" << endl);
965 Cerr(
"***** iPenaltyMarkovRandomField::LocalPreProcessingStep() -> A problem occurred while building specific neighborhood of voxel " << a_voxel <<
" !" << endl);
971 Cerr(
"***** iPenaltyMarkovRandomField::LocalPreProcessingStep() -> A problem occurred while computing the similirity factors of the neighborhood of voxel " << a_voxel <<
" !" << endl);
993 if (neighbor==-1)
continue;
1001 FLTNB difference = ap_image[a_voxel] - ap_image[neighbor];
1009 value = 0.5 * difference * difference;
1016 if (denominator==0.) value = 0.;
1017 else value = difference * difference / denominator;
1023 FLTNB squared_difference = difference * difference;
1042 FLTNB abs_difference = fabs(difference);
1044 else value = 0.5 * abs_difference * abs_difference;
1049 if (fpclassify(value) != FP_NORMAL) value = 0.;
1051 else result += proximity_factor * similarity_factor * value;
1057 if (fpclassify(result) != FP_NORMAL) result = 0.;
1077 if (neighbor==-1)
continue;
1081 FLTNB* p_image = ap_image;
1087 FLTNB difference = p_image[a_voxel] - p_image[neighbor];
1089 FLTNB first_derivative = 0.;
1095 first_derivative = difference;
1102 FLTNB term_square = term * term;
1103 if (term_square==0.) first_derivative = 0.;
1104 else first_derivative = difference * (term + 2.*p_image[neighbor]) / (term_square);
1110 FLTNB difference = p_image[a_voxel] - p_image[neighbor];
1112 first_derivative = 2. * delta_square * difference
1113 / pow( difference*difference + delta_square , 2. );
1132 if (difference==0.) first_derivative = 0.;
1135 FLTNB abs_difference = fabs(difference);
1137 else first_derivative = difference;
1143 if (fpclassify(first_derivative) != FP_NORMAL) first_derivative = 0.;
1145 else result += proximity_factor * similarity_factor * first_derivative;
1151 if (fpclassify(result) != FP_NORMAL) result = 0.;
1172 if (neighbor==-1)
continue;
1176 FLTNB* p_image = ap_image;
1182 FLTNB second_derivative = 0.;
1188 second_derivative = 1.;
1195 FLTNB term_cube = term * term * term;
1196 if (term_cube==0.) second_derivative = 0.;
1197 else second_derivative = (8.*p_image[neighbor]*p_image[neighbor])/(term_cube);
1203 FLTNB difference = p_image[a_voxel] - p_image[neighbor];
1204 FLTNB difference_square = difference * difference;
1206 second_derivative = -2. * delta_square * (3.*difference_square - delta_square)
1207 / pow( difference_square + delta_square , 3. );
1214 second_derivative *= second_derivative;
1220 FLTNB difference = p_image[a_voxel] - p_image[neighbor];
1229 second_derivative = 0.;
1234 if (fpclassify(second_derivative) != FP_NORMAL) second_derivative = 0.;
1236 else result += proximity_factor * similarity_factor * second_derivative;
1242 if (fpclassify(result) != FP_NORMAL) result = 0.;
INTNB m_neighborhoodMaxNbVoxels
INTNB ** m2p_neighborhoodKernel
int BuildSpecificNeighborhood(INTNB a_voxel, int a_th)
INTNB m_similarityBowsherNbVoxels
int m_penaltyDerivativesOrder
#define MRF_POTENTIAL_QUADRATIC
#define MRF_SIMILARITY_BOWSHER
FLTNB m_potentialGemanMcClureDelta
FLTNB GetVoxSizeX()
Get the voxel's size along the X axis, in mm.
FLTNB m_potentialHuberDelta
FLTNB GetVoxSizeZ()
Get the voxel's size along the Z axis, in mm.
FLTNB m_potentialRelativeDifferenceGamma
#define MRF_NEIGHBORHOOD_BOX
#define MRF_NEIGHBORHOOD_SPHERE
int GetNbMultiModalImages()
Get the number of additional multimodal images.
int BuildProximityFactors()
A function used to build the kernel of the proximity factors.
int LocalPreProcessingStep(int a_tbf, int a_rbf, int a_cbf, INTNB a_voxel, int a_th)
int m_neighborhoodBoxOrder
FLTNB ComputeSecondDerivative(int a_tbf, int a_rbf, int a_cbf, INTNB a_voxel, int a_th)
int ReadConfigurationFile(const string &a_configurationFile)
FLTNB ComputeFirstDerivative(int a_tbf, int a_rbf, int a_cbf, INTNB a_voxel, int a_th)
INTNB ** m2p_neighborhoodIndices
FLTNB * mp_proximityKernel
#define MRF_POTENTIAL_GREEN
FLTNB m_similarityBowsherThreshold
int InitializeSpecific()
This function is used to initialize specific stuff to the child penalty.
INTNB ** m2p_helper_bowsher
FLTNB GetVoxSizeY()
Get the voxel's size along the Y axis, in mm.
FLTNB m_neighborhoodSphereRadius
#define MRF_POTENTIAL_HUBER
iPenaltyMarkovRandomField()
The constructor of iPenaltyMarkovRandomField.
#define MRF_PROXIMITY_GAUSSIAN
INTNB GetNbVoxXY()
Get the number of voxels in a slice.
This class is designed to generically described any penalty applied to MAP algorithms.
#define MRF_POTENTIAL_RELATIVE_DIFFERENCE
#define MRF_PROXIMITY_NONE
#define MRF_POTENTIAL_GEMAN_MCCLURE
#define KEYWORD_MANDATORY
FLTNB ** m2p_similarityFactors
int ReadOptionsList(const string &a_optionsList)
FLTNB m_potentialGreenLogCoshDelta
#define MRF_SIMILARITY_NONE
FLTNB ComputePenaltyValue(int a_tbf, int a_rbf, int a_cbf, INTNB a_voxel, int a_th)
int ComputeSimilarityFactors(int a_tbf, int a_rbf, int a_cbf, INTNB a_voxel, int a_th)
int GetNbThreadsForImageComputation()
Get the number of threads used for image operations.
#define MRF_PROXIMITY_EUCLIDIAN
~iPenaltyMarkovRandomField()
The destructor of iPenaltyMarkovRandomField.
FLTNB m_potentialHebertLeahyMu
INTNB * mp_neighborhoodNbVoxels
INTNB GetNbVoxX()
Get the number of voxels along the X axis.
INTNB GetNbVoxZ()
Get the number of voxels along the Z axis.
FLTNB m_proximityGaussianFWHM
#define MRF_NEIGHBORHOOD_6_NEAREST
int CheckSpecificParameters()
A private function used to check the parameters settings specific to the child penalty.
int BuildNeighborhoodKernel()
A function used to build the neighborhood kernel.
int ReadDataASCIIFile(const string &a_file, const string &a_keyword, T *ap_return, int a_nbElts, bool a_mandatoryFlag)
Look for "a_nbElts" elts in the "a_file" file matching the "a_keyword" string passed as parameter a...
#define MRF_POTENTIAL_HEBERT_LEAHY
void ShowHelpSpecific()
A function used to show help about the child penalty.
oImageSpace * mp_ImageSpace
#define MRF_PROXIMITY_VOXEL
oImageDimensionsAndQuantification * mp_ImageDimensionsAndQuantification
INTNB GetNbVoxY()
Get the number of voxels along the Y axis.
#define KEYWORD_OPTIONAL_ERROR
int m_neighborhoodBoxExcludeCorners