Cleaning unused variables here and there

- variables are commented out or warning prevented using a unused_variable macro
This commit is contained in:
Proton local user
2024-05-23 00:10:31 +02:00
parent 7caad8be89
commit f15a6f5871
3 changed files with 18 additions and 12 deletions

View File

@ -6,6 +6,12 @@
#include <cstring>
#include <iterator>
#ifdef __GNUC__
#define VARIABLE_IS_NOT_USED __attribute__ ((unused))
#else
#define VARIABLE_IS_NOT_USED
#endif
//Function to get method and class name for logging purposes.
template <size_t FL, size_t PFL>
const char* computeMethodName(const char (&function)[FL], const char (&prettyFunction)[PFL])
@ -24,7 +30,7 @@ const char* computeMethodName(const char (&function)[FL], const char (&prettyFun
namespace itk {
/* reference string required for comparison with tag values */
static const char* ImageOrientationStrings[] = {
static const char VARIABLE_IS_NOT_USED *ImageOrientationStrings[] = {
"NotDefined",
"HFS",
"FFS",
@ -40,49 +46,49 @@ static const bool verbose = false;
/* this is in the end a IEC to HFS...
* but we keep this for ourselves...
*/
static double Standard_DRT2LPS[9] = {
static double VARIABLE_IS_NOT_USED Standard_DRT2LPS[9] = {
1, 0, 0,
0, 0, -1,
0, 1, 0
};
static double PAElementsIEC[9] = {
static double VARIABLE_IS_NOT_USED PAElementsIEC[9] = {
1, 0, 0,
0, -1, 0,
0, 0, -1
};
static double LATElementsIEC[9] = {
static double VARIABLE_IS_NOT_USED LATElementsIEC[9] = {
0, 0, -1,
0, -1, 0,
-1, 0, 0
};
static double HFS2IEC[9] = {
static double VARIABLE_IS_NOT_USED HFS2IEC[9] = {
1, 0, 0,
0, 0, 1,
0, -1, 0
};
static double FFS2IEC[9] = {
static double VARIABLE_IS_NOT_USED FFS2IEC[9] = {
-1, 0, 0,
0, 0, -1,
0, -1, 0
};
static double HFP2IEC[9] = {
static double VARIABLE_IS_NOT_USED HFP2IEC[9] = {
-1, 0, 0,
0, 0, 1,
0, 1, 0
};
static double FFP2IEC[9] = {
static double VARIABLE_IS_NOT_USED FFP2IEC[9] = {
1, 0, 0,
0, 0, -1,
0, 1, 0
};
static double PAT2IEC[9] = {
static double VARIABLE_IS_NOT_USED PAT2IEC[9] = {
1, 0, 0,
0, 0, 1,
0, -1, 0

View File

@ -143,7 +143,7 @@ MutualInformationTwoImageToOneImageMetric<TFixedImage, TMovingImage>::GetValue()
//std::cout<< "-----> Mutual :: fixedImageRegion1: "<< metric1->GetFixedImageRegion() << std::endl;
auto movingImageRegion = this->m_Filter1->GetOutput()->GetBufferedRegion();
unsigned int numberOfPixels = movingImageRegion.GetNumberOfPixels();
//unsigned int numberOfPixels = movingImageRegion.GetNumberOfPixels();
//auto numberOfSamples = static_cast<unsigned int>(numberOfPixels * 0.50); //100%
// since we have a ROI, then we should not set allPixels to TRUE.
@ -180,7 +180,7 @@ MutualInformationTwoImageToOneImageMetric<TFixedImage, TMovingImage>::GetValue()
//std::cout<< "-----> Mutual :: fixedImageRegion2: "<< metric2->GetFixedImageRegion() << std::endl;
movingImageRegion = this->m_Filter2->GetOutput()->GetBufferedRegion();
numberOfPixels = movingImageRegion.GetNumberOfPixels();
//numberOfPixels = movingImageRegion.GetNumberOfPixels();
//numberOfSamples = static_cast<unsigned int>(numberOfPixels * 0.50); //100%
//metric2->SetNumberOfSpatialSamples(numberOfSamples);

View File

@ -262,7 +262,7 @@ NormalizedCorrelationTwoImageToOneImageMetric<TFixedImage, TMovingImage>::GetVal
}
// Calculate the measure value between fixed image 1 and the moving image
auto oldprecision = std::cout.precision();
//auto oldprecision = std::cout.precision();
// std::cout<<"Region " <<this->GetFixedImageRegion1() <<std::endl;