File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 2020int example_gradientdescent ( int argc, char * argv[] )
2121{
2222// Typedefs
23- const unsigned int Dimension = 2 ;
23+ constexpr unsigned int Dimension = 2 ;
2424using PixelType = float ;
2525using OutputPixelType = unsigned char ;
2626using ImageType = itk::Image< PixelType, Dimension >;
@@ -124,7 +124,7 @@ return EXIT_SUCCESS;
124124int example_regularstepgradientdescent ( int argc, char * argv[] )
125125{
126126// Typedefs
127- const unsigned int Dimension = 2 ;
127+ constexpr unsigned int Dimension = 2 ;
128128using PixelType = float ;
129129using OutputPixelType = unsigned char ;
130130using ImageType = itk::Image< PixelType, Dimension >;
Original file line number Diff line number Diff line change @@ -137,7 +137,7 @@ SingleImageCostFunction<TImage>
137137 }
138138
139139 // Convert the image function output to the cost function derivative
140- const typename DerivativeType::ValueType DerivativeThreshold = 15.0 ;
140+ constexpr typename DerivativeType::ValueType DerivativeThreshold = 15.0 ;
141141 for (unsigned int i=0 ; i<ImageDimension; i++)
142142 {
143143 derivative[i] = static_cast <typename DerivativeType::ValueType>( output[i] );
You can’t perform that action at this time.
0 commit comments