X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=segmentation%2FclitkConnectedComponentLabelingGenericFilter.txx;h=89154a552c49f9b89a14078c4b63570ec29f6b32;hb=5a7da4aedae5c204bc55c187717193e5950f9a44;hp=33f4f3bea93e1a02c2609ebdc4199ee0d9cbce3e;hpb=bf4928c59a1d39f53fe03deb4b73ecb7e1cf214b;p=clitk.git diff --git a/segmentation/clitkConnectedComponentLabelingGenericFilter.txx b/segmentation/clitkConnectedComponentLabelingGenericFilter.txx index 33f4f3b..89154a5 100644 --- a/segmentation/clitkConnectedComponentLabelingGenericFilter.txx +++ b/segmentation/clitkConnectedComponentLabelingGenericFilter.txx @@ -3,7 +3,7 @@ Authors belong to: - University of LYON http://www.universite-lyon.fr/ - - Léon Bérard cancer center http://oncora1.lyon.fnclcc.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 @@ -14,7 +14,7 @@ - BSD See included LICENSE.txt file - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html - ======================================================================-====*/ + ===========================================================================**/ #ifndef CLITKCONNECTEDCOMPONENTLABELINGSGENERICFILTER_TXX #define CLITKCONNECTEDCOMPONENTLABELINGSGENERICFILTER_TXX @@ -32,7 +32,7 @@ template clitk::ConnectedComponentLabelingGenericFilter::ConnectedComponentLabelingGenericFilter(): ImageToImageGenericFilter("ConnectedComponentLabeling") { - // InitializeImageType<2>(); + InitializeImageType<2>(); InitializeImageType<3>(); //InitializeImageType<4>(); } @@ -47,7 +47,7 @@ void clitk::ConnectedComponentLabelingGenericFilter::InitializeIma ADD_IMAGE_TYPE(Dim, uchar); ADD_IMAGE_TYPE(Dim, short); // ADD_IMAGE_TYPE(Dim, int); - // ADD_IMAGE_TYPE(Dim, float); + ADD_IMAGE_TYPE(Dim, float); } //-------------------------------------------------------------------- @@ -72,14 +72,12 @@ template template void clitk::ConnectedComponentLabelingGenericFilter::UpdateWithInputImageType() { - DD("UpdateWithInputImageType"); - // Reading input typename ImageType::Pointer input = this->template GetInput(0); // Output image type typedef itk::Image OutputImageType; - PrintMemory(true, "initial"); + //PrintMemory(true, "initial"); typename OutputImageType::Pointer output; { @@ -95,11 +93,11 @@ void clitk::ConnectedComponentLabelingGenericFilter::UpdateWithInp // connectFilter->SetNumberOfThreads(8); connectFilter->Update(); temp = connectFilter->GetOutput(); - PrintMemory(true, "after udpate"); + // PrintMemory(true, "after udpate"); } - PrintMemory(true, "after CCL block"); - DD(input->GetReferenceCount()); - DD(temp->GetReferenceCount()); + // PrintMemory(true, "after CCL block"); + // DD(input->GetReferenceCount()); + // DD(temp->GetReferenceCount()); // Sort by size and remove too small area. typedef itk::RelabelComponentImageFilter RelabelFilterType; @@ -109,9 +107,9 @@ void clitk::ConnectedComponentLabelingGenericFilter::UpdateWithInp relabelFilter->SetMinimumObjectSize(mArgsInfo.minSize_arg); relabelFilter->Update(); - DD(mArgsInfo.inputBG_arg); - DD(mArgsInfo.full_flag); - DD(mArgsInfo.minSize_arg); + // DD(mArgsInfo.inputBG_arg); + // DD(mArgsInfo.full_flag); + // DD(mArgsInfo.minSize_arg); // Set information const std::vector & a @@ -120,16 +118,16 @@ void clitk::ConnectedComponentLabelingGenericFilter::UpdateWithInp for(unsigned int i=0; iGetSizeOfObjectsInPhysicalUnits(); m_OriginalNumberOfObjects = relabelFilter->GetOriginalNumberOfObjects(); - DD(m_OriginalNumberOfObjects); - DD(m_SizeOfObjectsInPhysicalUnits.size()); + // DD(m_OriginalNumberOfObjects); + // DD(m_SizeOfObjectsInPhysicalUnits.size()); output = relabelFilter->GetOutput(); } - PrintMemory(true, "after block"); + // PrintMemory(true, "after block"); // Write/Save results this->template SetNextOutput(output); - PrintMemory(true, "end filter "); + // PrintMemory(true, "end filter "); } //--------------------------------------------------------------------