Skip to content

Commit

Permalink
STYLE: Use default member initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
arobert01 committed Apr 18, 2020
1 parent 8db5415 commit 9ec2bc5
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 33 deletions.
2 changes: 1 addition & 1 deletion include/rtkDePierroRegularizationImageFilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ class ITK_EXPORT DePierroRegularizationImageFilter : public itk::ImageToImageFil
CustomBinaryFilterPointerType m_CustomBinaryFilter;

private:
float m_Beta;
float m_Beta{ 0.01 };

}; // end of class

Expand Down
2 changes: 0 additions & 2 deletions include/rtkDePierroRegularizationImageFilter.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ template <class TInputImage, class TOutputImage>
DePierroRegularizationImageFilter<TInputImage, TOutputImage>::DePierroRegularizationImageFilter()
{
this->SetNumberOfRequiredInputs(2);
// Set default parameters
m_Beta = 0.01;

// Create each filter of the composite filter
m_MultiplyConstant1ImageFilter = MultiplyImageFilterType::New();
Expand Down
10 changes: 5 additions & 5 deletions include/rtkOSEMConeBeamReconstructionFilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -213,20 +213,20 @@ class ITK_EXPORT OSEMConeBeamReconstructionFilter

private:
/** Number of projections processed before the volume is updated (several for OS-EM) */
unsigned int m_NumberOfProjectionsPerSubset;
unsigned int m_NumberOfProjectionsPerSubset{ 1 };

/** Geometry object */
ThreeDCircularProjectionGeometry::Pointer m_Geometry;

/** Number of iterations */
unsigned int m_NumberOfIterations;
unsigned int m_NumberOfIterations{ 3 };

/** PSF correction coefficients */
float m_SigmaZero;
float m_Alpha;
float m_SigmaZero{ -1 };
float m_Alpha{ -1 };

/** Hyperparameter for the regularization */
float m_BetaRegularization;
float m_BetaRegularization{ 0.01 };

}; // end of class

Expand Down
7 changes: 0 additions & 7 deletions include/rtkOSEMConeBeamReconstructionFilter.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,6 @@ OSEMConeBeamReconstructionFilter<TVolumeImage, TProjectionImage>::OSEMConeBeamRe
{
this->SetNumberOfRequiredInputs(2);

// Set default parameters
m_NumberOfIterations = 3;
m_SigmaZero = -1;
m_Alpha = -1;
m_BetaRegularization = 0.01;

// Create each filter of the composite filter
m_ExtractFilter = ExtractFilterType::New();
m_MultiplyFilter = MultiplyFilterType::New();
Expand All @@ -61,7 +55,6 @@ OSEMConeBeamReconstructionFilter<TVolumeImage, TProjectionImage>::OSEMConeBeamRe

// Default parameters
m_ExtractFilter->SetDirectionCollapseToSubmatrix();
m_NumberOfProjectionsPerSubset = 1; // Default is the OSEM behavior
}

template <class TVolumeImage, class TProjectionImage>
Expand Down
8 changes: 4 additions & 4 deletions include/rtkZengBackProjectionImageFilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,10 @@ class ITK_EXPORT ZengBackProjectionImageFilter : public BackProjectionImageFilte
void
operator=(const Self &) = delete; // purposely not implemented

float m_SigmaZero;
float m_Alpha;
VectorType m_VectorOrthogonalDetector;
PointType m_centerVolume;
float m_SigmaZero{ 1.5417233052142099 };
float m_Alpha{ 0.016241189545787734 };
VectorType m_VectorOrthogonalDetector{ 0. };
PointType m_centerVolume{ 0 };
};

} // end namespace rtk
Expand Down
5 changes: 0 additions & 5 deletions include/rtkZengBackProjectionImageFilter.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,7 @@ template <class TInputImage, class TOutputImage>
ZengBackProjectionImageFilter<TInputImage, TOutputImage>::ZengBackProjectionImageFilter()
{
// Set default parameters
m_SigmaZero = 1.5417233052142099;
m_Alpha = 0.016241189545787734;
m_VectorOrthogonalDetector[0] = 0;
m_VectorOrthogonalDetector[1] = 0;
m_VectorOrthogonalDetector[2] = 1;
m_centerVolume.Fill(0);

// Create each filter of the composite filter
m_AddImageFilter = AddImageFilterType::New();
Expand Down
8 changes: 4 additions & 4 deletions include/rtkZengForwardProjectionImageFilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,10 @@ class ITK_EXPORT ZengForwardProjectionImageFilter : public ForwardProjectionImag
void
operator=(const Self &) = delete; // purposely not implemented

float m_SigmaZero;
float m_Alpha;
VectorType m_VectorOrthogonalDetector;
PointType m_centerVolume;
float m_SigmaZero{ 1.5417233052142099 };
float m_Alpha{ 0.016241189545787734 };
VectorType m_VectorOrthogonalDetector{ 0. };
PointType m_centerVolume{ 0 };
};

} // end namespace rtk
Expand Down
5 changes: 0 additions & 5 deletions include/rtkZengForwardProjectionImageFilter.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,7 @@ template <class TInputImage, class TOutputImage>
ZengForwardProjectionImageFilter<TInputImage, TOutputImage>::ZengForwardProjectionImageFilter()
{
// Set default parameters
m_SigmaZero = 1.5417233052142099;
m_Alpha = 0.016241189545787734;
m_VectorOrthogonalDetector[0] = 0;
m_VectorOrthogonalDetector[1] = 0;
m_VectorOrthogonalDetector[2] = 1;
m_centerVolume.Fill(0);

// Create each filter of the composite filter
m_RegionOfInterest = RegionOfInterestFilterType::New();
Expand Down

0 comments on commit 9ec2bc5

Please sign in to comment.