diff --git a/SoftwareGuide/Latex/Appendices/CodingStyleGuide.tex b/SoftwareGuide/Latex/Appendices/CodingStyleGuide.tex index 825b29d1..d6bb644f 100644 --- a/SoftwareGuide/Latex/Appendices/CodingStyleGuide.tex +++ b/SoftwareGuide/Latex/Appendices/CodingStyleGuide.tex @@ -915,7 +915,7 @@ \subsubsection{Temporary Variable Naming} // on into a temporary image to use as the input to the mini-pipeline. This // avoids a complete copy of the image. typename OutputImageType::Pointer output = this->GetOutput(); -typename OutputImageType::Pointer tmp = OutputImageType::New(); +auto tmp = OutputImageType::New(); tmp->SetRequestedRegion( output->GetRequestedRegion() ); tmp->SetBufferedRegion( output->GetBufferedRegion() ); tmp->SetLargestPossibleRegion( output->GetLargestPossibleRegion() ); @@ -2069,7 +2069,7 @@ \subsection{Indentation and Tabs} this->AllocateOutputs(); // Create a process accumulator for tracking the progress of this minipipeline. - ProgressAccumulator::Pointer progress = ProgressAccumulator::New(); + auto progress = ProgressAccumulator::New(); progress->SetMiniPipelineFilter( this ); ... @@ -2825,7 +2825,7 @@ \subsection{Empty Lines} // Write the output using WriterType = itk::ImageFileWriter< OutputImageType >; - WriterType::Pointer writer = WriterType::New(); + auto writer = WriterType::New(); writer->SetFileName( argv[2] ); writer->SetInput( hMinimaFilter->GetOutput() ); diff --git a/SoftwareGuide/Latex/Architecture/SystemOverview.tex b/SoftwareGuide/Latex/Architecture/SystemOverview.tex index 7717745d..f292e362 100644 --- a/SoftwareGuide/Latex/Architecture/SystemOverview.tex +++ b/SoftwareGuide/Latex/Architecture/SystemOverview.tex @@ -255,7 +255,7 @@ \subsection{Smart Pointers and Memory Management} // here an interpolator is created and associated to the // "interp" SmartPointer. - InterpolatorType::Pointer interp = InterpolatorType::New(); + auto interp = InterpolatorType::New(); } /* <------ End of scope */ \end{minted} @@ -823,7 +823,7 @@ \section{Wrapping} using ImageType = itk::Image< PixelType, Dimension >; using ReaderType = itk::ImageFileReader< ImageType >; - ReaderType::Pointer reader = ReaderType::New(); + auto reader = ReaderType::New(); reader->SetFileName( inputImage ); using StructuringElementType = itk::FlatStructuringElement< Dimension >;