/*========================================================================= 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 clitkDecomposeAndReconstructImageFilter_txx #define clitkDecomposeAndReconstructImageFilter_txx /* ================================================= * @file clitkDecomposeAndReconstructImageFilter.txx * @author * @date * * @brief * ===================================================*/ namespace clitk { //------------------------------------------------------------------- // Update with the number of dimensions //------------------------------------------------------------------- template DecomposeAndReconstructImageFilter::DecomposeAndReconstructImageFilter() { m_Verbose=false; for (unsigned int i=0; i void DecomposeAndReconstructImageFilter::GenerateData() { // Internal type typedef itk::Image InternalImageType; // Filters used typedef clitk::DecomposeThroughErosionImageFilter DecomposeThroughErosionImageFilterType; typedef clitk::ReconstructThroughDilationImageFilter ReconstructThroughDilationImageFilterType; // Erode typename DecomposeThroughErosionImageFilterType::Pointer erosionFilter=DecomposeThroughErosionImageFilterType::New(); erosionFilter->SetInput(this->GetInput()); erosionFilter->SetVerbose(m_Verbose); erosionFilter->SetFullyConnected(m_FullyConnected); erosionFilter->SetRadius(m_Radius); erosionFilter->SetNumberOfNewLabels(m_NumberOfNewLabels); erosionFilter->SetMinimumObjectSize(m_MinimumObjectSize); erosionFilter->SetMinimumNumberOfIterations(m_MinimumNumberOfIterations); erosionFilter->Update(); // Reconstruct typename ReconstructThroughDilationImageFilterType::Pointer reconstructionFilter =ReconstructThroughDilationImageFilterType::New(); reconstructionFilter->SetInput(erosionFilter->GetOutput()); reconstructionFilter->SetVerbose(m_Verbose); reconstructionFilter->SetRadius(m_Radius); reconstructionFilter->SetMaximumNumberOfLabels(m_MaximumNumberOfLabels); reconstructionFilter->SetBackgroundValue(m_BackgroundValue); reconstructionFilter->SetForegroundValue(m_ForegroundValue); reconstructionFilter->Update(); // Output this->SetNthOutput(0,reconstructionFilter->GetOutput()); } }//end clitk #endif //#define clitkDecomposeAndReconstructImageFilter_txx