Skip to content

Commit 8f4939d

Browse files
jhlegarretadzenanz
authored andcommitted
STYLE: Make style consistent with the ITK style
Make style consistent with the ITK style: - Use medial capitals in variable names, starting with lower case.
1 parent 7ba787a commit 8f4939d

File tree

2 files changed

+37
-37
lines changed

2 files changed

+37
-37
lines changed

Modules/IO/MeshBase/include/itkMeshFileTestHelper.h

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ TestCellDataContainer(typename TMesh::CellDataContainerPointer cellData0,
247247

248248
template <typename TMesh>
249249
int
250-
test(char * INfilename, char * OUTfilename, bool IsBinary)
250+
test(char * inputFileName, char * outputFileName, bool isBinary)
251251
{
252252
using MeshType = TMesh;
253253

@@ -258,14 +258,14 @@ test(char * INfilename, char * OUTfilename, bool IsBinary)
258258
using MeshFileWriterPointer = typename MeshFileWriterType::Pointer;
259259

260260
MeshFileReaderPointer reader = MeshFileReaderType::New();
261-
reader->SetFileName(INfilename);
261+
reader->SetFileName(inputFileName);
262262
try
263263
{
264264
reader->Update();
265265
}
266266
catch (const itk::ExceptionObject & err)
267267
{
268-
std::cerr << "Read file " << INfilename << " failed " << std::endl;
268+
std::cerr << "Read file " << inputFileName << " failed " << std::endl;
269269
std::cerr << err << std::endl;
270270
return EXIT_FAILURE;
271271
}
@@ -278,16 +278,16 @@ test(char * INfilename, char * OUTfilename, bool IsBinary)
278278
}
279279

280280
MeshFileWriterPointer writer = MeshFileWriterType::New();
281-
if (itksys::SystemTools::GetFilenameLastExtension(INfilename) ==
282-
itksys::SystemTools::GetFilenameLastExtension(OUTfilename))
281+
if (itksys::SystemTools::GetFilenameLastExtension(inputFileName) ==
282+
itksys::SystemTools::GetFilenameLastExtension(outputFileName))
283283
{
284284
writer->SetMeshIO(reader->GetModifiableMeshIO());
285285
}
286-
writer->SetFileName(OUTfilename);
286+
writer->SetFileName(outputFileName);
287287
writer->SetInput(reader->GetOutput());
288288

289289
// NOTE ALEX: we should document the usage
290-
if (IsBinary)
290+
if (isBinary)
291291
{
292292
writer->SetFileTypeAsBINARY();
293293
}
@@ -298,25 +298,25 @@ test(char * INfilename, char * OUTfilename, bool IsBinary)
298298
}
299299
catch (const itk::ExceptionObject & err)
300300
{
301-
std::cerr << "Write file " << OUTfilename << " failed " << std::endl;
301+
std::cerr << "Write file " << outputFileName << " failed " << std::endl;
302302
std::cerr << err << std::endl;
303303
return EXIT_FAILURE;
304304
}
305305

306-
if (!itksys::SystemTools::FilesDiffer(INfilename, OUTfilename))
306+
if (!itksys::SystemTools::FilesDiffer(inputFileName, outputFileName))
307307
{
308308
return EXIT_SUCCESS;
309309
}
310310

311311
auto reader1 = MeshFileReaderType::New();
312-
reader1->SetFileName(OUTfilename);
312+
reader1->SetFileName(outputFileName);
313313
try
314314
{
315315
reader1->Update();
316316
}
317317
catch (const itk::ExceptionObject & err)
318318
{
319-
std::cerr << "Read file " << OUTfilename << " failed " << std::endl;
319+
std::cerr << "Read file " << outputFileName << " failed " << std::endl;
320320
std::cerr << err << std::endl;
321321
return EXIT_FAILURE;
322322
}

Modules/IO/MeshBase/include/itkMeshIOBase.h

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -204,9 +204,9 @@ class ITKIOMeshBase_EXPORT MeshIOBase : public LightProcessObject
204204

205205
template <typename T>
206206
void
207-
SetPixelType(const T & itkNotUsed(dummy), bool UsePointPixel = true)
207+
SetPixelType(const T & itkNotUsed(dummy), bool usePointPixel = true)
208208
{
209-
if (UsePointPixel)
209+
if (usePointPixel)
210210
{
211211
SetNumberOfPointPixelComponents(1);
212212
SetPointPixelComponentType(MapComponentType<T>::CType);
@@ -222,9 +222,9 @@ class ITKIOMeshBase_EXPORT MeshIOBase : public LightProcessObject
222222

223223
template <typename T>
224224
void
225-
SetPixelType(const RGBPixel<T> & itkNotUsed(dummy), bool UsePointPixel = true)
225+
SetPixelType(const RGBPixel<T> & itkNotUsed(dummy), bool usePointPixel = true)
226226
{
227-
if (UsePointPixel)
227+
if (usePointPixel)
228228
{
229229
SetNumberOfPointPixelComponents(3);
230230
SetPointPixelComponentType(MapComponentType<T>::CType);
@@ -240,9 +240,9 @@ class ITKIOMeshBase_EXPORT MeshIOBase : public LightProcessObject
240240

241241
template <typename T>
242242
void
243-
SetPixelType(const RGBAPixel<T> & itkNotUsed(dummy), bool UsePointPixel = true)
243+
SetPixelType(const RGBAPixel<T> & itkNotUsed(dummy), bool usePointPixel = true)
244244
{
245-
if (UsePointPixel)
245+
if (usePointPixel)
246246
{
247247
SetNumberOfPointPixelComponents(4);
248248
SetPointPixelComponentType(MapComponentType<T>::CType);
@@ -258,9 +258,9 @@ class ITKIOMeshBase_EXPORT MeshIOBase : public LightProcessObject
258258

259259
template <typename T, unsigned int VLength>
260260
void
261-
SetPixelType(const Vector<T, VLength> & itkNotUsed(dummy), bool UsePointPixel = true)
261+
SetPixelType(const Vector<T, VLength> & itkNotUsed(dummy), bool usePointPixel = true)
262262
{
263-
if (UsePointPixel)
263+
if (usePointPixel)
264264
{
265265
SetNumberOfPointPixelComponents(VLength);
266266
SetPointPixelComponentType(MapComponentType<T>::CType);
@@ -276,9 +276,9 @@ class ITKIOMeshBase_EXPORT MeshIOBase : public LightProcessObject
276276

277277
template <typename T, unsigned int VLength>
278278
void
279-
SetPixelType(const CovariantVector<T, VLength> & itkNotUsed(dummy), bool UsePointPixel = true)
279+
SetPixelType(const CovariantVector<T, VLength> & itkNotUsed(dummy), bool usePointPixel = true)
280280
{
281-
if (UsePointPixel)
281+
if (usePointPixel)
282282
{
283283
SetNumberOfPointPixelComponents(VLength);
284284
SetPointPixelComponentType(MapComponentType<T>::CType);
@@ -294,9 +294,9 @@ class ITKIOMeshBase_EXPORT MeshIOBase : public LightProcessObject
294294

295295
template <typename T, unsigned int VLength>
296296
void
297-
SetPixelType(const FixedArray<T, VLength> & itkNotUsed(dummy), bool UsePointPixel = true)
297+
SetPixelType(const FixedArray<T, VLength> & itkNotUsed(dummy), bool usePointPixel = true)
298298
{
299-
if (UsePointPixel)
299+
if (usePointPixel)
300300
{
301301
SetNumberOfPointPixelComponents(VLength);
302302
SetPointPixelComponentType(MapComponentType<T>::CType);
@@ -312,9 +312,9 @@ class ITKIOMeshBase_EXPORT MeshIOBase : public LightProcessObject
312312

313313
template <typename T, unsigned int VLength>
314314
void
315-
SetPixelType(const SymmetricSecondRankTensor<T, VLength> itkNotUsed(dummy), bool UsePointPixel = true)
315+
SetPixelType(const SymmetricSecondRankTensor<T, VLength> itkNotUsed(dummy), bool usePointPixel = true)
316316
{
317-
if (UsePointPixel)
317+
if (usePointPixel)
318318
{
319319
SetNumberOfPointPixelComponents(VLength * (VLength + 1) / 2);
320320
SetPointPixelComponentType(MapComponentType<T>::CType);
@@ -330,9 +330,9 @@ class ITKIOMeshBase_EXPORT MeshIOBase : public LightProcessObject
330330

331331
template <typename T>
332332
void
333-
SetPixelType(const DiffusionTensor3D<T> & itkNotUsed(dummy), bool UsePointPixel = true)
333+
SetPixelType(const DiffusionTensor3D<T> & itkNotUsed(dummy), bool usePointPixel = true)
334334
{
335-
if (UsePointPixel)
335+
if (usePointPixel)
336336
{
337337
SetNumberOfPointPixelComponents(6);
338338
SetPointPixelComponentType(MapComponentType<T>::CType);
@@ -348,9 +348,9 @@ class ITKIOMeshBase_EXPORT MeshIOBase : public LightProcessObject
348348

349349
template <typename T, unsigned int VRows, unsigned int VColumns>
350350
void
351-
SetPixelType(const Matrix<T, VRows, VColumns> & itkNotUsed(dummy), bool UsePointPixel = true)
351+
SetPixelType(const Matrix<T, VRows, VColumns> & itkNotUsed(dummy), bool usePointPixel = true)
352352
{
353-
if (UsePointPixel)
353+
if (usePointPixel)
354354
{
355355
SetNumberOfPointPixelComponents(VRows * VColumns);
356356
SetPointPixelComponentType(MapComponentType<T>::CType);
@@ -366,9 +366,9 @@ class ITKIOMeshBase_EXPORT MeshIOBase : public LightProcessObject
366366

367367
template <typename T>
368368
void
369-
SetPixelType(const std::complex<T> & itkNotUsed(dummy), bool UsePointPixel = true)
369+
SetPixelType(const std::complex<T> & itkNotUsed(dummy), bool usePointPixel = true)
370370
{
371-
if (UsePointPixel)
371+
if (usePointPixel)
372372
{
373373
SetNumberOfPointPixelComponents(2);
374374
SetPointPixelComponentType(MapComponentType<T>::CType);
@@ -384,9 +384,9 @@ class ITKIOMeshBase_EXPORT MeshIOBase : public LightProcessObject
384384

385385
template <typename T>
386386
void
387-
SetPixelType(const Array<T> & array, bool UsePointPixel = true)
387+
SetPixelType(const Array<T> & array, bool usePointPixel = true)
388388
{
389-
if (UsePointPixel)
389+
if (usePointPixel)
390390
{
391391
SetNumberOfPointPixelComponents(array.Size());
392392
SetPointPixelComponentType(MapComponentType<T>::CType);
@@ -402,9 +402,9 @@ class ITKIOMeshBase_EXPORT MeshIOBase : public LightProcessObject
402402

403403
template <typename T>
404404
void
405-
SetPixelType(const VariableLengthVector<T> & vector, bool UsePointPixel = true)
405+
SetPixelType(const VariableLengthVector<T> & vector, bool usePointPixel = true)
406406
{
407-
if (UsePointPixel)
407+
if (usePointPixel)
408408
{
409409
SetNumberOfPointPixelComponents(vector.Size());
410410
SetPointPixelComponentType(MapComponentType<T>::CType);
@@ -420,9 +420,9 @@ class ITKIOMeshBase_EXPORT MeshIOBase : public LightProcessObject
420420

421421
template <typename T>
422422
void
423-
SetPixelType(const VariableSizeMatrix<T> & matrix, bool UsePointPixel = true)
423+
SetPixelType(const VariableSizeMatrix<T> & matrix, bool usePointPixel = true)
424424
{
425-
if (UsePointPixel)
425+
if (usePointPixel)
426426
{
427427
SetNumberOfPointPixelComponents(matrix.Rows() * matrix.Cols());
428428
SetPointPixelComponentType(MapComponentType<T>::CType);

0 commit comments

Comments
 (0)