From: tbaudier Date: Mon, 6 Aug 2018 14:18:26 +0000 (+0200) Subject: cosmetic X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=a942f07e3765dcdfdf4cc23d8978543180aa42c4;p=clitk.git cosmetic --- diff --git a/tools/clitkBackProjectImageGenericFilter.txx b/tools/clitkBackProjectImageGenericFilter.txx index 52dd428..b13186e 100644 --- a/tools/clitkBackProjectImageGenericFilter.txx +++ b/tools/clitkBackProjectImageGenericFilter.txx @@ -34,7 +34,7 @@ namespace clitk //================================================================================ template void BackProjectImageGenericFilter::UpdateWithPixelType() { - + //--------------------------------- // Define the images //--------------------------------- @@ -51,11 +51,11 @@ namespace clitk const unsigned int OutputImageDimension=3; typedef float OutputPixelType; typedef itk::Image OutputImageType; - + //Create the BackProjectImageFilter typedef BackProjectImageFilter BackProjectImageFilterType; typename BackProjectImageFilterType::Pointer filter=BackProjectImageFilterType::New(); - + //--------------------------------- //Pass all the necessary parameters @@ -63,69 +63,69 @@ namespace clitk unsigned int i=0; filter->SetInput(input); if (m_ArgsInfo.threads_given) filter->SetNumberOfThreads(m_ArgsInfo.threads_arg); - + //Projection parameters OutputImageType::PointType iso; if (m_ArgsInfo.iso_given) - { - for(i=0;iSetIsoCenter(iso); - } + { + for(i=0;iSetIsoCenter(iso); + } if (m_ArgsInfo.panel_shift_given) filter->SetPanelShift(m_ArgsInfo.panel_shift_arg[0], m_ArgsInfo.panel_shift_arg[1]); filter->SetSourceToScreen(m_ArgsInfo.screen_arg); filter->SetSourceToAxis(m_ArgsInfo.axis_arg); filter->SetProjectionAngle(m_ArgsInfo.angle_arg); if (m_ArgsInfo.matrix_given) - { - itk::Matrix rt =ReadMatrix3D(m_ArgsInfo.matrix_arg); - filter->SetRigidTransformMatrix(rt); - } + { + itk::Matrix rt =ReadMatrix3D(m_ArgsInfo.matrix_arg); + filter->SetRigidTransformMatrix(rt); + } filter->SetEdgePaddingValue(static_cast(m_ArgsInfo.pad_arg)); - + //Output image info if (m_ArgsInfo.like_given) - { - typedef itk::ImageFileReader ReaderType; - ReaderType::Pointer reader2=ReaderType::New(); - reader2->SetFileName(m_ArgsInfo.like_arg); - reader2->Update(); + { + typedef itk::ImageFileReader ReaderType; + ReaderType::Pointer reader2=ReaderType::New(); + reader2->SetFileName(m_ArgsInfo.like_arg); + reader2->Update(); - OutputImageType::Pointer image=reader2->GetOutput(); - filter->SetOutputParametersFromImage(image); - } + OutputImageType::Pointer image=reader2->GetOutput(); + filter->SetOutputParametersFromImage(image); + } else + { + if(m_ArgsInfo.origin_given) { - if(m_ArgsInfo.origin_given) - { - OutputImageType::PointType origin; - for(i=0;iSetOutputOrigin(origin); - } - if (m_ArgsInfo.spacing_given) - { - OutputImageType::SpacingType spacing; - for(i=0;iSetOutputSpacing(spacing); - } - if (m_ArgsInfo.spacing_given) - { - OutputImageType::SizeType size; - for(i=0;iSetOutputSize(size); - } + OutputImageType::PointType origin; + for(i=0;iSetOutputOrigin(origin); } + if (m_ArgsInfo.spacing_given) + { + OutputImageType::SpacingType spacing; + for(i=0;iSetOutputSpacing(spacing); + } + if (m_ArgsInfo.spacing_given) + { + OutputImageType::SizeType size; + for(i=0;iSetOutputSize(size); + } + } //Go filter->Update(); - + //Get the output OutputImageType::Pointer output=filter->GetOutput(); - + //Write the output typedef itk::ImageFileWriter OutputWriterType; OutputWriterType::Pointer outputWriter = OutputWriterType::New();