- DD((int)leftLabel);
-
- // Relative position
- StartNewStep("Left/Right limits with trachea");
-
- // Select LeftLabel (set label 1 to 0)
- ImagePointer temp = SetBackground<ImageType, ImageType>(m_working_trachea, m_working_trachea, 1, 0);
- writeImage<ImageType>(temp, "temp1.mhd");
-
- // Left relative position
- typedef clitk::AddRelativePositionConstraintToLabelImageFilter<TImageType> RelPosFilterType;
- typename RelPosFilterType::Pointer relPosFilter = RelPosFilterType::New();
- relPosFilter->SetCurrentStepBaseId(this->GetCurrentStepId());
- relPosFilter->VerboseStepOff();
- relPosFilter->WriteStepOff();
- relPosFilter->SetInput(m_working_image);
- relPosFilter->SetInputObject(temp);
- relPosFilter->SetOrientationType(RelPosFilterType::RightTo);
- relPosFilter->SetIntermediateSpacing(GetIntermediateSpacing());
- relPosFilter->SetFuzzyThreshold(GetFuzzyThreshold1());
- relPosFilter->Update();
- m_working_image = relPosFilter->GetOutput();
-
- // Select RightLabel (set label 2 to 0)
- temp = SetBackground<ImageType, ImageType>(m_working_trachea, m_working_trachea, 2, 0);
- writeImage<ImageType>(temp, "temp2.mhd");
-
- // Left relative position
- relPosFilter = RelPosFilterType::New();
- relPosFilter->SetCurrentStepBaseId(this->GetCurrentStepId());
- relPosFilter->VerboseStepOn();
- relPosFilter->WriteStepOn();
- relPosFilter->SetInput(m_working_image);
- relPosFilter->SetInputObject(temp);
- relPosFilter->SetOrientationType(RelPosFilterType::LeftTo);
- relPosFilter->SetIntermediateSpacing(GetIntermediateSpacing());
- relPosFilter->SetFuzzyThreshold(GetFuzzyThreshold1());
- relPosFilter->Update();
- m_working_image = relPosFilter->GetOutput();
-
-
- //-----------------------------------------------------
- // StartNewStep("Left/Right limits with trachea (slice by slice");
- // typedef SliceBySliceImageFilter<ImageType, ImageType,