- // Left : midline of the trachea
- // Right : "- upper part : contained within the pleural envelope
- //- intermediate section : medial to the superior vena cava and the arch of the azygos vein
- // - very caudal part : right upper lobe pulmonary vein"
- // AAV ??
-
- // Constraint at right from the SVC
- MaskImagePointer svc = GetAFDB()->template GetImage<MaskImageType>("SVC");
- typedef clitk::AddRelativePositionConstraintToLabelImageFilter<MaskImageType> RelPosFilterType;
- typename RelPosFilterType::Pointer relPosFilter = RelPosFilterType::New();
- relPosFilter->SetCurrentStepBaseId(this->GetCurrentStepId());
- relPosFilter->VerboseStepOff();
- relPosFilter->WriteStepOff();
- relPosFilter->SetInput(m_Working_Support);
- relPosFilter->SetInputObject(svc);
- relPosFilter->SetOrientationType(RelPosFilterType::RightTo);
- relPosFilter->SetIntermediateSpacing(2);
- relPosFilter->SetFuzzyThreshold(0.3);
- relPosFilter->Update();
- m_Working_Support = relPosFilter->GetOutput();
- m_Station4RL = m_Working_Support;
-
- // Left -> midline of the trachea
- // slice by slice, find X coord of 2D centroid (?)
- // check with previous line in order to not move too fast
-
- // skeleton ? -> need path description ? follow from slice to slice
- // OR CENTROID at each slice ?
-
- // Crop trachea
- // Extract list of slice from trachea
- // Loop slice -> Get centroid crop along line (BB limit) -> two supports
+ // Separate Aorta into DescendingAorta AscendingAorta
+ MaskImagePointer AscendingAorta = GetAFDB()->template GetImage<MaskImageType>("AscendingAorta");
+ MaskImagePointer DescendingAorta = GetAFDB()->template GetImage<MaskImageType>("DescendingAorta");
+
+ // Crop like support (inferiorly)
+ m_Working_Support = clitk::AutoCrop<MaskImageType>(m_Working_Support, GetBackgroundValue());
+ AscendingAorta =
+ clitk::ResizeImageLike<MaskImageType>(AscendingAorta, m_Working_Support, GetBackgroundValue());
+ DescendingAorta =
+ clitk::ResizeImageLike<MaskImageType>(DescendingAorta, m_Working_Support, GetBackgroundValue());
+
+ // Crop superior part (when AscendingAorta and DescendingAorta join)
+ MaskImagePointType p;
+ clitk::FindExtremaPointInAGivenDirection<MaskImageType>(AscendingAorta,
+ GetBackgroundValue(), 2, false, p);
+ double max = p[2]+AscendingAorta->GetSpacing()[2];
+ AscendingAorta =
+ clitk::CropImageRemoveGreaterThan<MaskImageType>(AscendingAorta, 2, max, false, GetBackgroundValue());
+ DescendingAorta =
+ clitk::CropImageRemoveGreaterThan<MaskImageType>(DescendingAorta, 2, max, false, GetBackgroundValue());