Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions ARCHIVE/BRAINSTalairach/vtkTalairachConversion.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -314,8 +314,7 @@ vtkTalairachConversion::ProcessBOX(bool _left)
/* Base the Distance on the High Resolution Grid */
yStart1 = this->TalairachGrid->GetPoint(yGridStartIndex * TALAIRACH_X_POINTS)[1];
yStart2 = this->TalairachGrid->GetPoint((yGridStartIndex + 1) * TALAIRACH_X_POINTS)[1];
vtkTalairachConversion::ImageType::PointType regionStart;
regionStart.Fill(0.0);
vtkTalairachConversion::ImageType::PointType regionStart{};
regionStart[1] = yStart1 + boxDistancePercentage * (yStart2 - yStart1);

if ((this->SegmentationMode) && (yGridStartIndex == 0) && (boxDistancePercentage == 0.0))
Expand Down Expand Up @@ -395,8 +394,7 @@ vtkTalairachConversion::ProcessBOX(bool _left)
yEnd1 = this->TalairachGrid->GetPoint(yGridEndIndex * TALAIRACH_X_POINTS)[1];
yEnd2 = this->TalairachGrid->GetPoint((yGridEndIndex + 1) * TALAIRACH_X_POINTS)[1];

ImageType::PointType regionEnd;
regionEnd.Fill(0.0);
ImageType::PointType regionEnd{};
regionEnd[1] = yEnd1 + boxDistancePercentage * (yEnd2 - yEnd1);

if ((this->SegmentationMode) && (yGridEndIndex == 10) && (boxDistancePercentage == 1.0))
Expand Down
12 changes: 4 additions & 8 deletions ARCHIVE/BRAINSTexture/CenterOfROIInitTest.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,8 @@ main(int, char **)
ImageType::Pointer image1 = ImageType::New(), image2 = ImageType::New();

ImageType::RegionType region;
ImageType::SizeType size;
ImageType::IndexType origin;
size.Fill(100);
origin.Fill(0);
auto size = itk::MakeFilled<ImageType::SizeType>(100);
ImageType::IndexType origin{};
region.SetSize(size);
region.SetIndex(origin);

Expand All @@ -63,16 +61,15 @@ main(int, char **)
TransformType::Pointer tfm = TransformType::New();
tfm->SetIdentity();

TransformType::OutputVectorType rotAxis;
TransformType::OutputVectorType transVector;
auto rotAxis = itk::MakeFilled<TransformType::OutputVectorType>(1.);
auto transVector = itk::MakeFilled<TransformType::OutputVectorType>(50);

// and two ellipses, one of which is rotated and translated
EllipseSOType::ArrayType ePar;
ePar[0] = 10;
ePar[1] = 20;
ePar[2] = 40;

transVector.Fill(50);

tfm->Translate(transVector);
ellipse->SetRadius(ePar);
Expand All @@ -86,7 +83,6 @@ main(int, char **)
e2image->Update();
ImageType::Pointer eImage = e2image->GetOutput();

rotAxis.Fill(1.);
float rotAngle = 3.14 / 3.;
tfm->Rotate3D(rotAxis, rotAngle);
transVector[0] = 10;
Expand Down
3 changes: 1 addition & 2 deletions BRAINSCommonLib/ConvertToRigidAffine.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,7 @@ AssignConvertedTransform(AffineTransformPointer & result, const VnlTransformMatr
{
offset[i] = matrix.get(i, 3);
}
itk::Point<double, 3> ZeroCenter;
ZeroCenter.Fill(0.0);
itk::Point<double, 3> ZeroCenter{};
result->SetIdentity();
result->SetCenter(ZeroCenter); // Assume that rotation is about 0.0
result->SetMatrix(rotator);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,9 @@ CreateVolume(const size_t numOfComponents)
{
constexpr int imageSize = 11; // each image component has size of imageSize^3

VectorImageType::IndexType start;
start.Fill(0);
VectorImageType::IndexType start{};

VectorImageType::SizeType size;
size.Fill(imageSize);
auto size = itk::MakeFilled<VectorImageType::SizeType>(imageSize);

VectorImageType::RegionType region(start, size);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,10 @@ main(int argc, char * argv[])
}

// Set up transforms
itk::Vector<double, 3> rotationAxis;
rotationAxis.Fill(0.);
auto rotationAxis = itk::MakeFilled<itk::Vector<double, 3>>(0.);
rotationAxis[0] = 1.;
const double rotationAngle = .5; // in rad
itk::Vector<double, 3> translation;
translation.Fill(0.);
const double rotationAngle = .5; // in rad
auto translation = itk::MakeFilled<itk::Vector<double, 3>>(0.);
translation[1] = 300.; // in mm along P-axis
const TransformType::Pointer transform = TransformType::New();
transform->SetIdentity();
Expand Down
6 changes: 2 additions & 4 deletions BRAINSCommonLib/itkBRAINSToolsTestMain.h
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,7 @@ RegressionTestImage(const char * testImageFilename,
using ExtractType = itk::ExtractImageFilter<OutputType, DiffOutputType>;
using WriterType = itk::ImageFileWriter<DiffOutputType>;
using RegionType = itk::ImageRegion<ITK_TEST_DIMENSION_MAX>;
OutputType::SizeType size;
size.Fill(0);
OutputType::SizeType size{};

RescaleType::Pointer rescale = RescaleType::New();
rescale->SetOutputMinimum(itk::NumericTraits<unsigned char>::NonpositiveMin());
Expand All @@ -347,8 +346,7 @@ RegressionTestImage(const char * testImageFilename,

// Get the center slice of the image, In 3D, the first slice
// is often a black slice with little debugging information.
OutputType::IndexType index;
index.Fill(0);
OutputType::IndexType index{};
for (unsigned int i = 2; i < ITK_TEST_DIMENSION_MAX; ++i)
{
index[i] = size[i] / 2; // NOTE: Integer Divide used to get approximately
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,8 @@ void
RandomImageSource<TOutputImage>::GenerateOutputInformation()
{
TOutputImage * output;
IndexType index;
IndexType index{};

index.Fill(0);

output = this->GetOutput(0);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -406,8 +406,7 @@ RegressionTestImage(const char * testImageFilename,
using ExtractType = itk::Testing::ExtractSliceImageFilter<OutputType, DiffOutputType>;
using WriterType = itk::ImageFileWriter<DiffOutputType>;
using RegionType = itk::ImageRegion<ITK_TEST_DIMENSION_MAX>;
OutputType::SizeType size;
size.Fill(0);
OutputType::SizeType size{};

RescaleType::Pointer rescale = RescaleType::New();
rescale->SetOutputMinimum(itk::NumericTraits<unsigned char>::NonpositiveMin());
Expand All @@ -418,8 +417,7 @@ RegressionTestImage(const char * testImageFilename,

// Get the center slice of the image, In 3D, the first slice
// is often a black slice with little debugging information.
OutputType::IndexType index;
index.Fill(0);
OutputType::IndexType index{};
for (unsigned int i = 2; i < ITK_TEST_DIMENSION_MAX; i++)
{
index[i] = size[i] / 2; // NOTE: Integer Divide used to get approximately
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,10 @@ ExtractSliceImageFilter<TInputImage, TOutputImage>::SetExtractionRegion(InputIma
{
m_ExtractionRegion = extractRegion;

unsigned int nonzeroSizeCount = 0;
InputImageSizeType inputSize = extractRegion.GetSize();
OutputImageSizeType outputSize;
outputSize.Fill(0);
OutputImageIndexType outputIndex;
outputIndex.Fill(0);
unsigned int nonzeroSizeCount = 0;
InputImageSizeType inputSize = extractRegion.GetSize();
OutputImageSizeType outputSize{};
OutputImageIndexType outputIndex{};
/**
* check to see if the number of non-zero entries in the extraction region
* matches the number of dimensions in the output image.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,7 @@ main(int argc, char * argv[])

// calculate the physical image extent of input image with identity
// direction
ImageDirectionType direction2;
direction2.Fill(0);
ImageDirectionType direction2{};
direction2(0, 0) = 1.0;
direction2(1, 1) = 1.0;
direction2(2, 2) = 1.0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,7 @@ main(int argc, char * argv[])
image = volOrig;
}

SImageType::PointType origin;
origin.Fill(0);
SImageType::PointType origin{};

// This section assumes that the landmarks are defined as
// ITK compliant physical space
Expand Down Expand Up @@ -534,8 +533,7 @@ main(int argc, char * argv[])
std::vector<float> RPPC_to_RPAC_angle(myModel.GetNumDataSets());
std::vector<float> RPAC_over_RPPC(myModel.GetNumDataSets());
// Initializing CMtoRPMean
SImageType::PointType::VectorType CMtoRPMean;
CMtoRPMean.Fill(0.0);
SImageType::PointType::VectorType CMtoRPMean{};
// This for loop does two jobs
for (unsigned int currentDataset = 0; currentDataset < myModel.GetNumDataSets(); currentDataset++)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -434,8 +434,7 @@ class Rigid3DCenterReflectorFunctor : public itk::ObjectToObjectMetricBase
}

// Define start index
SImageType::IndexType outputImageStartIndex;
outputImageStartIndex.Fill(0);
SImageType::IndexType outputImageStartIndex{};

// Define the output image direction identical
SImageType::DirectionType outputImageDirection;
Expand Down
3 changes: 1 addition & 2 deletions BRAINSConstellationDetector/src/landmarkIO.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,8 @@ GenerateRGB2DImage(const RGBImageType::Pointer & orientedImage)
{
// Alocate 2DImage
RGB2DImageType::Pointer TwoDImage = RGB2DImageType::New();
RGB2DImageType::IndexType TwoDIndex;
RGB2DImageType::IndexType TwoDIndex{};

TwoDIndex[0] = 0;
TwoDIndex[1] = 0;
RGB2DImageType::SizeType TwoDSize;
TwoDSize[0] = orientedImage->GetLargestPossibleRegion().GetSize()[1];
Expand Down
12 changes: 4 additions & 8 deletions BRAINSConstellationDetector/src/landmarksConstellationCommon.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -496,11 +496,10 @@ computeTmspFromPoints(SImageType::PointType RP,
VersorRigidTransformType::Pointer
GetACPCAlignedZeroCenteredTransform(const LandmarksMapType & landmarks)
{
SImageType::PointType ZeroCenter;
SImageType::PointType ZeroCenter{};

const auto orig_AC = GetNamedPointFromLandmarkList(landmarks, "AC");

ZeroCenter.Fill(0.0);
VersorRigidTransformType::Pointer landmarkDefinedACPCAlignedToZeroTransform =
computeTmspFromPoints_Versor(GetNamedPointFromLandmarkList(landmarks, "RP"),
orig_AC,
Expand Down Expand Up @@ -660,13 +659,10 @@ MakeIsoTropicReferenceImage()
SImageType::DirectionType Ident;

Ident.SetIdentity();
SImageType::PointType Origin;
Origin.Fill(-127.5);
SImageType::SpacingType Spacing;
Spacing.Fill(1.0);
auto Origin = itk::MakeFilled<SImageType::PointType>(-127.5);
auto Spacing = itk::MakeFilled<SImageType::SpacingType>(1.0);

SImageType::SizeType Size;
Size.Fill(256);
auto Size = itk::MakeFilled<SImageType::SizeType>(256);
SImageType::RegionType Region;
Region.SetSize(Size);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ landmarksConstellationDetector::Compute_orig2msp_img_tfm(const SImagePointType &
const SImagePointType & AC,
const SImagePointType & PC)
{
SImageType::PointType ZeroCenter;
ZeroCenter.Fill(0.0);
SImageType::PointType ZeroCenter{};

const Euler3DTransformType::Pointer orig2msp_lmk_tfm_estimate = computeTmspFromPoints(RP, AC, PC, ZeroCenter);

Expand Down Expand Up @@ -372,8 +371,7 @@ landmarksConstellationDetector::FindCandidatePoints(
roiSize[1] = static_cast<SImageType::SizeType::SizeValueType>(1.0 + LPS_END[1] - LPS_BEGIN[1]);
roiSize[2] = static_cast<SImageType::SizeType::SizeValueType>(1.0 + LPS_END[2] - LPS_BEGIN[2]);
// start index
SImageType::IndexType roiStart;
roiStart.Fill(0);
SImageType::IndexType roiStart{};
// region
const SImageType::RegionType roiRegion(roiStart, roiSize);
roiImage->SetRegions(roiRegion);
Expand Down Expand Up @@ -499,8 +497,7 @@ landmarksConstellationDetector::FindCandidatePoints(
mi_size[0] = 2 * height + 1;
mi_size[1] = 2 * radii + 1;
mi_size[2] = 2 * radii + 1;
FImageType3D::IndexType mi_start;
mi_start.Fill(0);
FImageType3D::IndexType mi_start{};
const FImageType3D::RegionType mi_region(mi_start, mi_size);
lmkTemplateImage->SetRegions(mi_region);
lmkTemplateImage->Allocate();
Expand Down Expand Up @@ -682,8 +679,7 @@ landmarksConstellationDetector::LinearEstimation(LandmarksMapType &
return;
}
const std::string & newPointName = processingList[processingList.size() - 1];
SImageType::PointType newPoint;
newPoint.Fill(0);
SImageType::PointType newPoint{};

// Construct Xi_t
VectorType Xi_t;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,7 @@ landmarksConstellationDetector::Compute(const SImageType::Pointer & orig_space_i
LandmarksMapType zeroEyeCenters;
if (this->m_HoughEyeFailure)
{
SImageType::PointType zeroPoint;
zeroPoint.Fill(0);
SImageType::PointType zeroPoint{};

zeroEyeCenters["LE"] = zeroPoint;
zeroEyeCenters["RE"] = zeroPoint;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,7 @@ FindCenterOfBrainBasedOnTopOfHead(SImageType::Pointer & foreground,
double SupInf_thickness = 0;
double RLbyAP_area = 0;
{
SImageType::IndexType origin;
origin.Fill(0);
SImageType::IndexType origin{};
const auto physOrigin = volOrig->template TransformIndexToPhysicalPoint<double>(origin);
itk::ContinuousIndex<double, 3> originPlusOne;
originPlusOne[0] = volOrig->GetSpacing()[0];
Expand Down
6 changes: 2 additions & 4 deletions BRAINSDeface/BRAINSDeface.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -251,10 +251,8 @@ main(int argc, char * argv[])
maskInterpolator->SetInputImage(mask_labels);

// pad the distance map
MaskImageType::SizeType lowerPadBound;
lowerPadBound.Fill(80); // 40 mm @ 0.5 mm spacing
MaskImageType::SizeType upperPadBound;
upperPadBound.Fill(80); // 40 mm @ 0.5 mm spacing
auto lowerPadBound = itk::MakeFilled<MaskImageType::SizeType>(80);
auto upperPadBound = itk::MakeFilled<MaskImageType::SizeType>(80);

const itk::ConstantPadImageFilter<MaskImageType, MaskImageType>::Pointer padImageFilter =
itk::ConstantPadImageFilter<MaskImageType, MaskImageType>::New();
Expand Down
6 changes: 2 additions & 4 deletions BRAINSFit/TestSuite/CenterOfROIInitTest.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ main(int, char **)
using CastType = itk::CastImageFilter<ImageType, LocalMaskImageType>;
using CompositeTransformType = itk::CompositeTransform<double, 3>;

ImageType::SizeType size;
size.Fill(100);
auto size = itk::MakeFilled<ImageType::SizeType>(100);

const TransformType::Pointer tfm = TransformType::New();
tfm->SetIdentity();
Expand Down Expand Up @@ -85,8 +84,7 @@ main(int, char **)

ImageType::Pointer eTfmImage;
{
TransformType::OutputVectorType rotAxis;
rotAxis.Fill(1.);
auto rotAxis = itk::MakeFilled<TransformType::OutputVectorType>(1.);
const float rotAngle = 3.14 / 3.;
tfm->Rotate3D(rotAxis, rotAngle);
transVector[0] = 10;
Expand Down
3 changes: 1 addition & 2 deletions BRAINSROIAuto/TestSuite/TestImage.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ main(int, char * argv[])
ImageType::RegionType::IndexType index;
index[0] = index[1] = index[2] = 0;
region.SetIndex(index);
ImageType::RegionType::SizeType size;
size[0] = imageDim;
auto size = ImageType::RegionType::SizeType::Filled(imageDim);
size[1] = imageDim;
size[2] = imageDim;
region.SetSize(size);
Expand Down
12 changes: 4 additions & 8 deletions BRAINSSuperResolution/EdgeBasedWeightedTV/FFTWUpsampleTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@ int
main(int, char *[])
{
const std::complex<float> Zero(0.8F, 0.8F);
HalfHermetianImageType::RegionType::IndexType startIndex;
startIndex.Fill(0);
HalfHermetianImageType::RegionType::IndexType startIndex{};
HalfHermetianImageType::RegionType region;
region.SetIndex(startIndex);
HalfHermetianImageType::RegionType::SizeType size;
Expand Down Expand Up @@ -160,16 +159,13 @@ main(int, char *[])
using Image2D = itk::Image<float,3>;
Image2D::Pointer im2 = Image2D::New();
Image2D::RegionType region;
Image2D::RegionType::SizeType size;
size.Fill(IM2DSIZE);
auto size = itk::MakeFilled<Image2D::RegionType::SizeType>(IM2DSIZE);
region.SetSize(size);
Image2D::SpacingType spacing;
spacing.Fill(1.25);
auto spacing = itk::MakeFilled<Image2D::SpacingType>(1.25);
im2->SetSpacing(spacing);
im2->SetRegions(region);
im2->Allocate();
Image2D::IndexType idx;
idx.Fill(IM2DSIZE/2);
auto idx = itk::MakeFilled<Image2D::IndexType>(IM2DSIZE/2);
idx.Fill(0);
im2->SetPixel(idx,1.0F);
//using GradientType = itk::GradientImageFilter<Image2D>;
Expand Down
Loading
Loading