Skip to content

Commit 630350e

Browse files
albert-githubdzenanz
authored andcommitted
DOC: fixing "unbalanced grouping commands" warnings
Brute force approach to fix the "unbalanced grouping commands" warnings by explicitly placing the `ALIASES` `ITKStartGrouping` and `ITKEndGrouping` in the code where unbalanced grouping commands" warnings an attempt was made to insert the commands `@{` and `@}` and afterwards solving the warnings that were already present in respect to the "unbalanced grouping commands" warnings and also solving the warnings that appeared due to these changes. The usage of the script has been abandoned as this implicitly added the commands based on the layout and this is is hard to enforce and it is also hard to get the script without errors (would nearly require a compiler). This is related to issue #3654.
1 parent 32a2a6d commit 630350e

File tree

885 files changed

+4966
-2595
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

885 files changed

+4966
-2595
lines changed

Examples/IO/XML/itkParticleSwarmOptimizerSAXReader.cxx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ ParticleSwarmOptimizerSAXReader::EndElement(const char * name)
105105
bounds.push_back(value);
106106
}
107107
this->m_OutputObject->SetParameterBounds(bounds);
108-
109108
this->m_OutputObject->SetParametersConvergenceTolerance(
110109
this->m_ParametersConvergenceTolerance);
111110
}
@@ -174,7 +173,6 @@ ParticleSwarmOptimizerSAXReader::ReadFile()
174173
e.SetDescription(message.c_str());
175174
throw e;
176175
}
177-
178176
if (this->m_OutputObject == nullptr)
179177
{
180178
itkExceptionMacro("Object to be read is null!\n");
@@ -300,7 +298,6 @@ ParticleSwarmOptimizerSAXReader::GetAttribute(const char ** atts,
300298
}
301299
return nullptr;
302300
}
303-
304301
/** Check the current tags to see whether it matches a user input. */
305302
bool
306303
ParticleSwarmOptimizerSAXReader::ContextIs(const char * test) const
@@ -316,5 +313,4 @@ ParticleSwarmOptimizerSAXReader::ContextIs(const char * test) const
316313
}
317314
return (s == std::string(test));
318315
}
319-
320316
} // namespace itk

Examples/IO/XML/itkParticleSwarmOptimizerSAXWriter.cxx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ ParticleSwarmOptimizerSAXWriter::CanWriteFile(const char * name)
3737
}
3838
return yes;
3939
}
40-
4140
/**
4241
* Method for performing XML file generation from the input object.
4342
*/

Examples/RegistrationITKv4/DeformableRegistration4.cxx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,7 @@ main(int argc, char * argv[])
437437
CoordinateRepType>;
438438

439439
/** Create an setup displacement field generator. */
440+
/** @ITKStartGrouping */
440441
auto dispfieldGenerator = DisplacementFieldGeneratorType::New();
441442
dispfieldGenerator->UseReferenceImageOn();
442443
dispfieldGenerator->SetReferenceImage(fixedImage);
@@ -451,7 +452,7 @@ main(int argc, char * argv[])
451452
std::cerr << " : " << err << std::endl;
452453
return EXIT_FAILURE;
453454
}
454-
455+
/**@ITKEndGrouping*/
455456
using FieldWriterType = itk::ImageFileWriter<DisplacementFieldImageType>;
456457
auto fieldWriter = FieldWriterType::New();
457458

Examples/RegistrationITKv4/DeformableRegistration6.cxx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,7 @@ main(int argc, char * argv[])
474474
CoordinateRepType>;
475475

476476
/** Create an setup displacement field generator. */
477+
/** @ITKStartGrouping */
477478
auto dispfieldGenerator = DisplacementFieldGeneratorType::New();
478479
dispfieldGenerator->UseReferenceImageOn();
479480
dispfieldGenerator->SetReferenceImage(fixedImage);
@@ -488,7 +489,7 @@ main(int argc, char * argv[])
488489
std::cerr << " : " << err << std::endl;
489490
return EXIT_FAILURE;
490491
}
491-
492+
/**@ITKEndGrouping*/
492493
using FieldWriterType = itk::ImageFileWriter<DisplacementFieldImageType>;
493494
auto fieldWriter = FieldWriterType::New();
494495

Examples/RegistrationITKv4/DeformableRegistration7.cxx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,7 @@ main(int argc, char * argv[])
422422
CoordinateRepType>;
423423

424424
/** Create an setup displacement field generator. */
425+
/** @ITKStartGrouping */
425426
auto dispfieldGenerator = DisplacementFieldGeneratorType::New();
426427
dispfieldGenerator->UseReferenceImageOn();
427428
dispfieldGenerator->SetReferenceImage(fixedImage);
@@ -436,7 +437,7 @@ main(int argc, char * argv[])
436437
std::cerr << " : " << err << std::endl;
437438
return EXIT_FAILURE;
438439
}
439-
440+
/**@ITKEndGrouping*/
440441
using FieldWriterType = itk::ImageFileWriter<DisplacementFieldImageType>;
441442
auto fieldWriter = FieldWriterType::New();
442443

Examples/RegistrationITKv4/DeformableRegistration8.cxx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,7 @@ main(int argc, char * argv[])
437437
CoordinateRepType>;
438438

439439
/** Create an setup displacement field generator. */
440+
/** @ITKStartGrouping */
440441
auto dispfieldGenerator = DisplacementFieldGeneratorType::New();
441442
dispfieldGenerator->UseReferenceImageOn();
442443
dispfieldGenerator->SetReferenceImage(fixedImage);
@@ -451,7 +452,7 @@ main(int argc, char * argv[])
451452
std::cerr << " : " << err << std::endl;
452453
return EXIT_FAILURE;
453454
}
454-
455+
/**@ITKEndGrouping*/
455456
using FieldWriterType = itk::ImageFileWriter<DisplacementFieldImageType>;
456457
auto fieldWriter = FieldWriterType::New();
457458

Examples/Statistics/WeightedSampleStatistics.cxx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,10 @@ class ExampleWeightFunction
6767
using ConstPointer = itk::SmartPointer<const Self>;
6868

6969
/** Standard macros. */
70+
/** @ITKStartGrouping */
7071
itkOverrideGetNameOfClassMacro(ExampleWeightFunction);
7172
itkNewMacro(Self);
72-
73+
/**@ITKEndGrouping*/
7374
/** Input type */
7475
using InputType = MeasurementVectorType;
7576

Modules/Bridge/VTK/include/itkVTKImageExport.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,13 @@ class ITK_TEMPLATE_EXPORT VTKImageExport : public VTKImageExportBase
7676
itkConceptMacro(ImageDimensionCheck, (Concept::SameDimensionOrMinusOneOrTwo<3, Self::InputImageDimension>));
7777

7878
/** Set the input image of this image exporter. */
79+
/** @ITKStartGrouping */
7980
using Superclass::SetInput;
8081
void
8182
SetInput(const InputImageType *);
8283
InputImageType *
8384
GetInput();
84-
85+
/**@ITKEndGrouping*/
8586
protected:
8687
VTKImageExport();
8788
~VTKImageExport() override = default;

Modules/Bridge/VTK/include/itkVTKImageExportBase.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ class ITKVTK_EXPORT VTKImageExportBase : public ProcessObject
5454
GetCallbackUserData();
5555

5656
/** The function pointer type expected for a callback. */
57+
/** @ITKStartGrouping */
5758
using UpdateInformationCallbackType = void (*)(void *);
5859
using PipelineModifiedCallbackType = int (*)(void *);
5960
using WholeExtentCallbackType = int * (*)(void *);
@@ -66,11 +67,12 @@ class ITKVTK_EXPORT VTKImageExportBase : public ProcessObject
6667
using UpdateDataCallbackType = void (*)(void *);
6768
using DataExtentCallbackType = int * (*)(void *);
6869
using BufferPointerCallbackType = void * (*)(void *);
69-
70+
/**@ITKEndGrouping*/
7071
/** Compatibility for VTK older than 4.4. */
72+
/** @ITKStartGrouping */
7173
using FloatSpacingCallbackType = float * (*)(void *);
7274
using FloatOriginCallbackType = float * (*)(void *);
73-
75+
/**@ITKEndGrouping*/
7476
/**
7577
* \class CallbackTypeProxy
7678
* \brief Provide compatibility between VTK 4.4 and earlier versions.

Modules/Bridge/VTK/include/itkVTKImageImport.h

Lines changed: 30 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ class ITK_TEMPLATE_EXPORT VTKImageImport : public ImageSource<TOutputImage>
8383

8484
/** These are function pointer types for the pipeline connection
8585
* callbacks. */
86+
/** @ITKStartGrouping */
8687
using UpdateInformationCallbackType = void (*)(void *);
8788
using PipelineModifiedCallbackType = int (*)(void *);
8889
using WholeExtentCallbackType = int * (*)(void *);
@@ -95,24 +96,29 @@ class ITK_TEMPLATE_EXPORT VTKImageImport : public ImageSource<TOutputImage>
9596
using UpdateDataCallbackType = void (*)(void *);
9697
using DataExtentCallbackType = int * (*)(void *);
9798
using BufferPointerCallbackType = void * (*)(void *);
98-
99+
/**@ITKEndGrouping*/
99100
/** Compatibility for VTK older than 4.4. */
101+
/** @ITKStartGrouping */
100102
using FloatSpacingCallbackType = float * (*)(void *);
101103
using FloatOriginCallbackType = float * (*)(void *);
102-
104+
/**@ITKEndGrouping*/
103105
/** What to do when receiving UpdateInformation(). */
106+
/** @ITKStartGrouping */
104107
itkSetMacro(UpdateInformationCallback, UpdateInformationCallbackType);
105108
itkGetConstMacro(UpdateInformationCallback, UpdateInformationCallbackType);
106-
109+
/**@ITKEndGrouping*/
107110
/** What to do when receiving PipelineModified(). */
111+
/** @ITKStartGrouping */
108112
itkSetMacro(PipelineModifiedCallback, PipelineModifiedCallbackType);
109113
itkGetConstMacro(PipelineModifiedCallback, PipelineModifiedCallbackType);
110-
114+
/**@ITKEndGrouping*/
111115
/** What to do when receiving SetWholeExtent(). */
116+
/** @ITKStartGrouping */
112117
itkSetMacro(WholeExtentCallback, WholeExtentCallbackType);
113118
itkGetConstMacro(WholeExtentCallback, WholeExtentCallbackType);
114-
119+
/**@ITKEndGrouping*/
115120
/** What to do when receiving SetSpacing(). */
121+
/** @ITKStartGrouping */
116122
itkSetMacro(SpacingCallback, SpacingCallbackType);
117123
itkGetConstMacro(SpacingCallback, SpacingCallbackType);
118124
itkSetMacro(FloatSpacingCallback, FloatSpacingCallbackType);
@@ -122,8 +128,9 @@ class ITK_TEMPLATE_EXPORT VTKImageImport : public ImageSource<TOutputImage>
122128
{
123129
this->SetFloatSpacingCallback(f);
124130
}
125-
131+
/**@ITKEndGrouping*/
126132
/** What to do when receiving SetOrigin(). */
133+
/** @ITKStartGrouping */
127134
itkSetMacro(OriginCallback, OriginCallbackType);
128135
itkGetConstMacro(OriginCallback, OriginCallbackType);
129136
itkSetMacro(FloatOriginCallback, FloatOriginCallbackType);
@@ -133,39 +140,47 @@ class ITK_TEMPLATE_EXPORT VTKImageImport : public ImageSource<TOutputImage>
133140
{
134141
this->SetFloatOriginCallback(f);
135142
}
136-
143+
/**@ITKEndGrouping*/
137144
/** What to do when receiving SetDirection(). */
145+
/** @ITKStartGrouping */
138146
itkSetMacro(DirectionCallback, DirectionCallbackType);
139147
itkGetConstMacro(DirectionCallback, DirectionCallbackType);
140-
148+
/**@ITKEndGrouping*/
141149
/** What to do when receiving UpdateInformation(). */
150+
/** @ITKStartGrouping */
142151
itkSetMacro(ScalarTypeCallback, ScalarTypeCallbackType);
143152
itkGetConstMacro(ScalarTypeCallback, ScalarTypeCallbackType);
144-
153+
/**@ITKEndGrouping*/
145154
/** What to do when receiving SetNumberOfComponents(). */
155+
/** @ITKStartGrouping */
146156
itkSetMacro(NumberOfComponentsCallback, NumberOfComponentsCallbackType);
147157
itkGetConstMacro(NumberOfComponentsCallback, NumberOfComponentsCallbackType);
148-
158+
/**@ITKEndGrouping*/
149159
/** What to do when receiving PropagateUpdateExtent(). */
160+
/** @ITKStartGrouping */
150161
itkSetMacro(PropagateUpdateExtentCallback, PropagateUpdateExtentCallbackType);
151162
itkGetConstMacro(PropagateUpdateExtentCallback, PropagateUpdateExtentCallbackType);
152-
163+
/**@ITKEndGrouping*/
153164
/** What to do when receiving UpdateData(). */
165+
/** @ITKStartGrouping */
154166
itkSetMacro(UpdateDataCallback, UpdateDataCallbackType);
155167
itkGetConstMacro(UpdateDataCallback, UpdateDataCallbackType);
156-
168+
/**@ITKEndGrouping*/
157169
/** What to do when receiving DataExtent(). */
170+
/** @ITKStartGrouping */
158171
itkSetMacro(DataExtentCallback, DataExtentCallbackType);
159172
itkGetConstMacro(DataExtentCallback, DataExtentCallbackType);
160-
173+
/**@ITKEndGrouping*/
161174
/** What to do when receiving BufferPointer(). */
175+
/** @ITKStartGrouping */
162176
itkSetMacro(BufferPointerCallback, BufferPointerCallbackType);
163177
itkGetConstMacro(BufferPointerCallback, BufferPointerCallbackType);
164-
178+
/**@ITKEndGrouping*/
165179
/** Specify callback data. */
180+
/** @ITKStartGrouping */
166181
itkSetMacro2(CallbackUserData, void *);
167182
itkGetConstMacro(CallbackUserData, void *);
168-
183+
/**@ITKEndGrouping*/
169184
protected:
170185
VTKImageImport();
171186
~VTKImageImport() override = default;

0 commit comments

Comments
 (0)