X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=itk%2FclitkSliceBySliceRelativePositionFilter.txx;h=fc820be5ee44c48d8e37b2ebb2aa887b60e2921b;hb=a523f5be1e221995c0d4d29a0077b5e8b984c96d;hp=e68514da031c0f6f1a6725a2df78f97d0c189fe7;hpb=78952107253e2486853adc8a9e7c13faeda8c5a9;p=clitk.git diff --git a/itk/clitkSliceBySliceRelativePositionFilter.txx b/itk/clitkSliceBySliceRelativePositionFilter.txx index e68514d..fc820be 100644 --- a/itk/clitkSliceBySliceRelativePositionFilter.txx +++ b/itk/clitkSliceBySliceRelativePositionFilter.txx @@ -43,6 +43,7 @@ SliceBySliceRelativePositionFilter(): SetObjectCCLSelectionDirection(1); ObjectCCLSelectionIgnoreSingleCCLFlagOff(); VerboseSlicesFlagOff(); + this->SetK1(std::acos(-1.0)/2); } //-------------------------------------------------------------------- @@ -98,7 +99,8 @@ PrintOptions(std::ostream & os) << "ObjectCCLSelectionIgnoreSingleCCLFlag = " << this->GetObjectCCLSelectionIgnoreSingleCCLFlag() << std::endl << "IgnoreEmptySliceObjectFlag = " << this->GetIgnoreEmptySliceObjectFlag() << std::endl << "(RP) FastFlag = " << this->GetFastFlag() << std::endl - << "(RP) Radius = " << this->GetRadius() << std::endl; + << "(RP) Radius = " << this->GetRadius() << std::endl + << "(RP) K1 = " << this->GetK1() << std::endl; } //-------------------------------------------------------------------- @@ -238,6 +240,10 @@ GenerateOutputInformation() int nb=0; mObjectSlices[i] = LabelizeAndCountNumberOfObjects(mObjectSlices[i], 0, true, 1, nb); + if (GetVerboseSlicesFlag()) { + std::cout << "slice " << i << " nb = " << nb << std::endl; + } + // If no object and empty slices and if we need the full fuzzy map, create a dummy one. if ((nb==0) && (this->GetFuzzyMapOnlyFlag())) { typename FloatSliceType::Pointer one = FloatSliceType::New(); @@ -295,6 +301,7 @@ GenerateOutputInformation() if (GetVerboseSlicesFlag()) { std::cout << "Slice " << i << std::endl; relPosFilter->VerboseStepFlagOn(); + //relPosFilter->WriteStepFlagOn(); } relPosFilter->WriteStepFlagOff(); // relPosFilter->VerboseMemoryFlagOn(); @@ -319,6 +326,7 @@ GenerateOutputInformation() // relPosFilter->SetComputeFuzzyMapFlag(this->GetComputeFuzzyMapFlag()); relPosFilter->SetFastFlag(this->GetFastFlag()); relPosFilter->SetRadius(this->GetRadius()); + relPosFilter->SetK1(this->GetK1()); // Go ! relPosFilter->Update();