From 16fbd8ca75dd69d576fa2e7ed41ea99eb6f7930a Mon Sep 17 00:00:00 2001 From: David Sarrut Date: Wed, 12 Sep 2012 15:32:08 +0200 Subject: [PATCH] Remove unused files --- common/clitkImageUtilities.cxx | 34 --------- common/clitkImageUtilities.h | 52 -------------- common/clitkImageUtilities.txx | 122 --------------------------------- 3 files changed, 208 deletions(-) delete mode 100644 common/clitkImageUtilities.cxx delete mode 100644 common/clitkImageUtilities.h delete mode 100644 common/clitkImageUtilities.txx diff --git a/common/clitkImageUtilities.cxx b/common/clitkImageUtilities.cxx deleted file mode 100644 index eb3d1bc..0000000 --- a/common/clitkImageUtilities.cxx +++ /dev/null @@ -1,34 +0,0 @@ -/*========================================================================= - Program: vv http://www.creatis.insa-lyon.fr/rio/vv - - Authors belong to: - - University of LYON http://www.universite-lyon.fr/ - - Léon Bérard cancer center http://www.centreleonberard.fr - - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the copyright notices for more information. - - It is distributed under dual licence - - - BSD See included LICENSE.txt file - - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html -===========================================================================**/ -#ifndef CLITKIMAGEUTILITIES_CXX -#define CLITKIMAGEUTILITIES_CXX -/** - ================================================= - * @file clitkImageUtilities.cxx - * @author David Sarrut - * @date 22 Sep 2006 10:39:40 - * - * @brief - * - * - =================================================*/ - -#include "clitkImageUtilities.h" - -#endif /* end #define CLITKIMAGEUTILITIES_CXX */ - diff --git a/common/clitkImageUtilities.h b/common/clitkImageUtilities.h deleted file mode 100644 index ab12d21..0000000 --- a/common/clitkImageUtilities.h +++ /dev/null @@ -1,52 +0,0 @@ -/*========================================================================= - Program: vv http://www.creatis.insa-lyon.fr/rio/vv - - Authors belong to: - - University of LYON http://www.universite-lyon.fr/ - - Léon Bérard cancer center http://www.centreleonberard.fr - - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the copyright notices for more information. - - It is distributed under dual licence - - - BSD See included LICENSE.txt file - - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html -===========================================================================**/ -#ifndef CLITKIMAGEUTILITIES_H -#define CLITKIMAGEUTILITIES_H -/** - =================================================================== - * @file clitkImageUtilities.h - * @author David Sarrut - * @date 22 Sep 2006 10:38:36 - - * @brief - - ===================================================================*/ - -// clitk -#include "clitkCommon.h" -#include "clitkImageCommon.h" - -// std -#include -#include -#include - -// itk -#include "itkImageRegionConstIterator.h" - -namespace clitk { - - template - int ComputeHowManyDifferentIntensity(const typename ImageType::Pointer & image, - std::vector & listOfIntensities); - #include "clitkImageUtilities.txx" - -} // end namespace - -#endif /* end #define CLITKIMAGEUTILITIES_H */ - diff --git a/common/clitkImageUtilities.txx b/common/clitkImageUtilities.txx deleted file mode 100644 index 8f42551..0000000 --- a/common/clitkImageUtilities.txx +++ /dev/null @@ -1,122 +0,0 @@ -/*========================================================================= - Program: vv http://www.creatis.insa-lyon.fr/rio/vv - - Authors belong to: - - University of LYON http://www.universite-lyon.fr/ - - Léon Bérard cancer center http://www.centreleonberard.fr - - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the copyright notices for more information. - - It is distributed under dual licence - - - BSD See included LICENSE.txt file - - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html -===========================================================================**/ -#ifndef CLITKIMAGEUTILITIES_TXX -#define CLITKIMAGEUTILITIES_TXX -/** - ================================================= - * @file clitkImageUtilities.txx - * @author David Sarrut - * @date 22 Sep 2006 10:39:48 - * - * @brief - * - * - =================================================*/ - -//==================================================================== -// Compute the number of different intensities in an image -template -int ComputeHowManyDifferentIntensity(const typename ImageType::Pointer & image, - std::vector & l) -{ - //std::set listOfIntensities; - std::map listOfIntensities; - // listOfIntensities.resize(0); - typedef itk::ImageRegionConstIterator ConstIteratorType; - ConstIteratorType pi(image, image->GetLargestPossibleRegion()); - pi.Begin(); - while (!pi.IsAtEnd()) { - if (!listOfIntensities[pi.Get()]) listOfIntensities[pi.Get()] = true; - // if (std::find(listOfIntensities.begin(), -// listOfIntensities.end(), -// pi.Get()) == listOfIntensities.end()) { -// listOfIntensities.insert(pi.Get()); -// } - ++pi; - } - - //typename std::set::const_iterator ppi = listOfIntensities.begin(); - typename std::map::const_iterator ppi = listOfIntensities.begin(); - while (ppi != listOfIntensities.end()) { - l.push_back(ppi->first); - ++ppi; - } - - return listOfIntensities.size(); -} -//==================================================================== - -//==================================================================== -template -void ComputeWeightsOfEachClasses(const typename InputImageType::Pointer & input, - const typename MaskImageType::Pointer & mask, - const std::vector & listOfIntensities, - std::map > & mapOfLabelsAndWeights) -{ - // Check size - if (input->GetLargestPossibleRegion() != mask->GetLargestPossibleRegion()) { - itkGenericExceptionMacro(<< "Input and mask images have not the same size" - << std::endl - << "Input = " << input->GetLargestPossibleRegion() - << std::endl - << "Mask = " << mask->GetLargestPossibleRegion()); - } - - // reset weights list - mapOfLabelsAndWeights.clear(); - - // loop - typedef itk::ImageRegionConstIterator ConstInputIteratorType; - ConstInputIteratorType pi(input, input->GetLargestPossibleRegion()); - typedef itk::ImageRegionConstIterator ConstMaskIteratorType; - ConstMaskIteratorType pm(mask, mask->GetLargestPossibleRegion()); - pi.Begin(); - pm.Begin(); - while (!pi.IsAtEnd()) { - mapOfLabelsAndWeights[pm.Get()][pi.Get()]++; - ++pi; - ++pm; - } -} -//==================================================================== - -// //==================================================================== -// template -// typename ImageType::Pointer NewImage3D(int x, int y, int z, float dx, float dy, float dz) { -// typename ImageType::Pointer output = ImageType::New(); -// typename ImageType::RegionType region; -// typename ImageType::SizeType size; -// size[0] = x; -// size[1] = y; -// size[2] = z; -// region.SetSize(size); -// output->SetRegions(region); -// output->Allocate(); -// typename ImageType::SpacingType spacing; -// spacing[0] = dx; -// spacing[1] = dy; -// spacing[2] = dz; -// output->SetSpacing(spacing); -// return output; -// } -// //==================================================================== - - -#endif /* end #define CLITKIMAGEUTILITIES_TXX */ - -- 2.45.1