X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=segmentation%2FclitkConnectedComponentLabelingGenericFilter.txx;h=1a5ab247e5eb158a095d7ce515e555c99610ee08;hb=56ae68bbe5b50ad1ea8b6846f43f322d4aa36b70;hp=3c5784195c0fb6d79c048bfda6aec24eb9b38f96;hpb=765020625fbc092d283e221e36c83e60a1844cb7;p=clitk.git diff --git a/segmentation/clitkConnectedComponentLabelingGenericFilter.txx b/segmentation/clitkConnectedComponentLabelingGenericFilter.txx index 3c57841..1a5ab24 100644 --- a/segmentation/clitkConnectedComponentLabelingGenericFilter.txx +++ b/segmentation/clitkConnectedComponentLabelingGenericFilter.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); } //-------------------------------------------------------------------- @@ -57,10 +57,10 @@ template void clitk::ConnectedComponentLabelingGenericFilter::SetArgsInfo(const ArgsInfoType & a) { mArgsInfo=a; - SetIOVerbose(mArgsInfo.verbose_flag); + this->SetIOVerbose(mArgsInfo.verbose_flag); if (mArgsInfo.imagetypes_flag) this->PrintAvailableImageTypes(); - if (mArgsInfo.input_given) AddInputFilename(mArgsInfo.input_arg); - if (mArgsInfo.output_given) SetOutputFilename(mArgsInfo.output_arg); + if (mArgsInfo.input_given) this->AddInputFilename(mArgsInfo.input_arg); + if (mArgsInfo.output_given) this->SetOutputFilename(mArgsInfo.output_arg); } //-------------------------------------------------------------------- @@ -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 "); } //--------------------------------------------------------------------