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
- BSD See included LICENSE.txt file
- CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
- ======================================================================-====*/
+ ===========================================================================**/
// clitk
#include "clitkSegmentationUtils.h"
{
SetDirection(2);
UniqueConnectedComponentBySliceOff();
- SetIgnoreEmptySliceObject(false);
+ SetIgnoreEmptySliceObjectFlag(false);
+ UseASingleObjectConnectedComponentBySliceFlagOn();
+ this->VerboseStepFlagOff();
+ this->WriteStepFlagOff();
+ this->SetCombineWithOrFlag(false);
}
//--------------------------------------------------------------------
DD(this->GetDirection());
DD((int)this->GetObjectBackgroundValue());
DDV(this->GetOrientationTypeString(), (uint)this->GetNumberOfAngles());
- DD(this->GetResampleBeforeRelativePositionFilter());
+ DD(this->GetIntermediateSpacingFlag());
DD(this->GetIntermediateSpacing());
DD(this->GetFuzzyThreshold());
DD(this->GetUniqueConnectedComponentBySlice());
// Perform slice by slice relative position
this->StartNewStep("Perform slice by slice relative position");
for(unsigned int i=0; i<mInputSlices.size(); i++) {
- // Select main CC in each object slice (required ?)
+
+ // Count the number of CCL (allow to ignore empty slice)
int nb=0;
mObjectSlices[i] = LabelizeAndCountNumberOfObjects<SliceType>(mObjectSlices[i], 0, true, 1, nb);
- if ((!GetIgnoreEmptySliceObject()) || (nb!=0)) {
- mObjectSlices[i] = KeepLabels<SliceType>(mObjectSlices[i], 0, 1, 1, 1, true);
+ if ((!GetIgnoreEmptySliceObjectFlag()) || (nb!=0)) {
+
+ // Select or not a single CCL ?
+ if (GetUseASingleObjectConnectedComponentBySliceFlag()) {
+ mObjectSlices[i] = KeepLabels<SliceType>(mObjectSlices[i], 0, 1, 1, 1, true);
+ }
// Relative position
typedef clitk::AddRelativePositionConstraintToLabelImageFilter<SliceType> RelPosFilterType;
typename RelPosFilterType::Pointer relPosFilter = RelPosFilterType::New();
+
relPosFilter->VerboseStepFlagOff();
relPosFilter->WriteStepFlagOff();
- relPosFilter->SetCurrentStepBaseId(this->GetCurrentStepId());
relPosFilter->SetBackgroundValue(this->GetBackgroundValue());
relPosFilter->SetInput(mInputSlices[i]);
relPosFilter->SetInputObject(mObjectSlices[i]);
relPosFilter->SetInverseOrientationFlag(this->GetInverseOrientationFlag());
//relPosFilter->SetOrientationType(this->GetOrientationType());
relPosFilter->SetIntermediateSpacing(this->GetIntermediateSpacing());
- relPosFilter->SetResampleBeforeRelativePositionFilter(this->GetResampleBeforeRelativePositionFilter());
+ relPosFilter->SetIntermediateSpacingFlag(this->GetIntermediateSpacingFlag());
relPosFilter->SetFuzzyThreshold(this->GetFuzzyThreshold());
relPosFilter->AutoCropFlagOff(); // important ! because we join the slices after this loop
relPosFilter->SetCombineWithOrFlag(this->GetCombineWithOrFlag());