Skip to content
Merged
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
2 changes: 1 addition & 1 deletion SoftwareGuide/Cover/Source/AntialiasFilter.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ int main( int argc, char ** argv )
{
writer->Update();
}
catch( itk::ExceptionObject & err )
catch( const itk::ExceptionObject & err )
{
std::cout << "ExceptionObject caught !" << std::endl;
std::cout << err << std::endl;
Expand Down
2 changes: 1 addition & 1 deletion SoftwareGuide/Cover/Source/BinaryMaskMedianFilter.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ int main( int argc, char ** argv )
{
writer->Update();
}
catch( itk::ExceptionObject & err )
catch( const itk::ExceptionObject & err )
{
std::cout << "ExceptionObject caught !" << std::endl;
std::cout << err << std::endl;
Expand Down
6 changes: 3 additions & 3 deletions SoftwareGuide/Cover/Source/BinaryThresholdFilter.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ int main(int argc, char * argv[] )
{
imageReader->Update();
}
catch( itk::ExceptionObject & excp )
catch( const itk::ExceptionObject & excp )
{
std::cerr << excp << std::endl;
return -1;
Expand All @@ -66,7 +66,7 @@ int main(int argc, char * argv[] )
{
filter->Update();
}
catch( itk::ExceptionObject & excp )
catch( const itk::ExceptionObject & excp )
{
std::cerr << excp << std::endl;
return -1;
Expand All @@ -83,7 +83,7 @@ int main(int argc, char * argv[] )
{
imageWriter->Update();
}
catch( itk::ExceptionObject & excp )
catch( const itk::ExceptionObject & excp )
{
std::cerr << excp << std::endl;
return -1;
Expand Down
2 changes: 1 addition & 1 deletion SoftwareGuide/Cover/Source/DilateFilter.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ int main( int argc, char ** argv )
{
writer->Update();
}
catch( itk::ExceptionObject & err )
catch( const itk::ExceptionObject & err )
{
std::cout << "ExceptionObject caught !" << std::endl;
std::cout << err << std::endl;
Expand Down
2 changes: 1 addition & 1 deletion SoftwareGuide/Cover/Source/ImageReadExtractWriteRGB.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ int main( int argc, char ** argv )
{
writer->Update();
}
catch( itk::ExceptionObject & err )
catch( const itk::ExceptionObject & err )
{
std::cout << "ExceptionObject caught !" << std::endl;
std::cout << err << std::endl;
Expand Down
2 changes: 1 addition & 1 deletion SoftwareGuide/Cover/Source/ModelBasedSegmentation.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ int main( int argc, char *argv[] )
try {
registration->StartRegistration();
}
catch( itk::ExceptionObject & exp ) {
catch( const itk::ExceptionObject & exp ) {
std::cerr << "Exception caught ! " << std::endl;
std::cerr << exp << std::endl;
}
Expand Down
2 changes: 1 addition & 1 deletion SoftwareGuide/Cover/Source/NegateFilter.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ int main( int argc, char ** argv )
{
writer->Update();
}
catch( itk::ExceptionObject & err )
catch( const itk::ExceptionObject & err )
{
std::cout << "ExceptionObject caught !" << std::endl;
std::cout << err << std::endl;
Expand Down
2 changes: 1 addition & 1 deletion SoftwareGuide/Cover/Source/RescaleIntensityFilter.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ int main( int argc, char ** argv )
{
writer->Update();
}
catch( itk::ExceptionObject & err )
catch( const itk::ExceptionObject & err )
{
std::cout << "ExceptionObject caught !" << std::endl;
std::cout << err << std::endl;
Expand Down
4 changes: 2 additions & 2 deletions SoftwareGuide/Cover/Source/VWBlueRemoval.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ int main(int argc, char * argv[] )
{
imageReader->Update();
}
catch( itk::ExceptionObject & excp )
catch( const itk::ExceptionObject & excp )
{
std::cout << excp << std::endl;
return -1;
Expand Down Expand Up @@ -98,7 +98,7 @@ int main(int argc, char * argv[] )
{
imageWriter->Update();
}
catch( itk::ExceptionObject & excp )
catch( const itk::ExceptionObject & excp )
{
std::cout << excp << std::endl;
return -1;
Expand Down
6 changes: 3 additions & 3 deletions SoftwareGuide/Cover/Source/VWColorSegmentation.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ int main(int argc, char * argv[] )
{
imageReader->Update();
}
catch( itk::ExceptionObject & excp )
catch( const itk::ExceptionObject & excp )
{
std::cerr << excp << std::endl;
return -1;
Expand Down Expand Up @@ -95,7 +95,7 @@ int main(int argc, char * argv[] )
{
confidenceFilter->Update();
}
catch( itk::ExceptionObject & excp )
catch( const itk::ExceptionObject & excp )
{
std::cerr << excp << std::endl;
return -1;
Expand All @@ -112,7 +112,7 @@ int main(int argc, char * argv[] )
{
imageWriter->Update();
}
catch( itk::ExceptionObject & excp )
catch (const itk::ExceptionObject & excp )
{
std::cerr << excp << std::endl;
return -1;
Expand Down
4 changes: 2 additions & 2 deletions SoftwareGuide/Cover/Source/VWHistogramHSV.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ int main(int argc, char * argv[] )
{
reader->Update();
}
catch( itk::ExceptionObject & excp )
catch( const itk::ExceptionObject & excp )
{
std::cout << excp << std::endl;
return -1;
Expand Down Expand Up @@ -199,7 +199,7 @@ int main(int argc, char * argv[] )
{
writer->Update();
}
catch( itk::ExceptionObject & excp )
catch( const itk::ExceptionObject & excp )
{
std::cout << excp << std::endl;
return -1;
Expand Down
4 changes: 2 additions & 2 deletions SoftwareGuide/Cover/Source/VWHistogramRGB.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ int main(int argc, char * argv[] )
{
reader->Update();
}
catch( itk::ExceptionObject & excp )
catch( const itk::ExceptionObject & excp )
{
std::cout << excp << std::endl;
return -1;
Expand Down Expand Up @@ -99,7 +99,7 @@ int main(int argc, char * argv[] )
{
writer->Update();
}
catch( itk::ExceptionObject & excp )
catch( const itk::ExceptionObject & excp )
{
std::cout << excp << std::endl;
return -1;
Expand Down
19 changes: 11 additions & 8 deletions SoftwareGuide/Latex/Appendices/CodingStyleGuide.tex
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@ \chapter{Coding Style Guide}
architectural and implementation decisions made early in the project. For
example, the decision was made to implement ITK with a C++ core using
principles of generic programming, so the rules are oriented towards this style
of implementation. Some guidelines are relatively arbitrary, such as
indentation levels and style. However, an attempt was made to find coding
styles consistent with accepted practices. The point is to adhere to a common
of implementation. All guidelines are strictly enforced, including whitespace
indentation levels and style. Careful consideration and considerable discussion
occurred in an attempt to find coding
styles consistent with accepted practices in the active community.
The primary goal is to adhere to a common
style to assist community members of the future to learn, use, maintain, and
extend ITK. A common style greatly improves readability.
extend ITK. Given the fact that code is read many more times than it is written, a strong
emphasis is placed on generating a common style that improves readability.

Please do your best to be an outstanding member of the ITK community. The rules
described here have been developed with the community as a whole in mind.
Expand Down Expand Up @@ -3193,11 +3196,11 @@ \section{Exception Handling}
{
// Code liable to throw an exception
}
catch( ExceptionObject & exc )
catch( const ExceptionObject & exc )
{
std::cerr << exc << std::endl;
}
catch( std::exception & exc )
catch( const std::exception & exc )
{
std::cerr << exc.what() << std::endl;
}
Expand All @@ -3213,7 +3216,7 @@ \section{Exception Handling}
m_ExceptionMessage = "";
this->TestFileExistanceAndReadability();
}
catch( ExceptionObject & exc )
catch( const ExceptionObject & exc )
{
m_ExceptionMessage = exc.GetDescription();
}
Expand All @@ -3229,7 +3232,7 @@ \section{Exception Handling}
{
m_Optimizer->StartOptimization();
}
catch( ExceptionObject & exc )
catch( const ExceptionObject & exc )
{
// An error has occurred in the optimization.
// Update the parameters.
Expand Down
2 changes: 1 addition & 1 deletion SoftwareGuide/Latex/Architecture/SystemOverview.tex
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ \subsection{Error Handling and Exceptions}
{
//...try executing some code here...
}
catch ( itk::ExceptionObject & exp )
catch( const itk::ExceptionObject & exp )
{
//...if an exception is thrown catch it here
}
Expand Down