X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=segmentation%2FclitkExtractLymphStation_3P.txx;h=eb50f76c932364a25a095e063c2016ab5b079aa0;hb=0b62ce46bc2faf52102522ff93ba161f17fa25d0;hp=d1be71047093fb38dce38b1c25d571ff878a6230;hpb=a339bdc482ea9752ec53195bc9a47e8b05dba582;p=clitk.git diff --git a/segmentation/clitkExtractLymphStation_3P.txx b/segmentation/clitkExtractLymphStation_3P.txx index d1be710..eb50f76 100644 --- a/segmentation/clitkExtractLymphStation_3P.txx +++ b/segmentation/clitkExtractLymphStation_3P.txx @@ -65,23 +65,13 @@ ExtractStation_3P_Remove_Structures() StartNewStep("[Station 3P] Remove some structures."); - MaskImagePointer Aorta = GetAFDB()->template GetImage("Aorta"); - clitk::AndNot(m_Working_Support, Aorta, GetBackgroundValue()); - - MaskImagePointer VertebralBody = GetAFDB()->template GetImage("VertebralBody"); - clitk::AndNot(m_Working_Support, VertebralBody); - - MaskImagePointer SubclavianArtery = GetAFDB()->template GetImage("SubclavianArtery"); - clitk::AndNot(m_Working_Support, SubclavianArtery); - - MaskImagePointer Esophagus = GetAFDB()->template GetImage("Esophagus"); - clitk::AndNot(m_Working_Support, Esophagus); - - MaskImagePointer AzygousVein = GetAFDB()->template GetImage("AzygousVein"); - clitk::AndNot(m_Working_Support, AzygousVein); - - MaskImagePointer Thyroid = GetAFDB()->template GetImage("Thyroid"); - clitk::AndNot(m_Working_Support, Thyroid); + Remove_Structures("Aorta"); + Remove_Structures("VertebralBody"); + Remove_Structures("SubclavianArtery"); + Remove_Structures("Esophagus"); + Remove_Structures("Azygousvein"); + Remove_Structures("Thyroid"); + Remove_Structures("VertebralArtery"); StopCurrentStep(m_Working_Support); m_ListOfStations["3P"] = m_Working_Support; @@ -430,6 +420,29 @@ ExtractStation_3P_LR_sup_Limits() } //-------------------------------------------------------------------- +//-------------------------------------------------------------------- +template +void +clitk::ExtractLymphStationsFilter:: +ExtractStation_3P_LR_sup_Limits_2() +{ + /* + Use VertebralArtery to limit. + + + StartNewStep("[Station 3P] Left/Right limits with VertebralArtery"); + + // Load structures + MaskImagePointer VertebralArtery = GetAFDB()->template GetImage("VertebralArtery"); + + clitk::AndNot(m_Working_Support, VertebralArtery); + + StopCurrentStep(m_Working_Support); + m_ListOfStations["3P"] = m_Working_Support; + */ +} +//-------------------------------------------------------------------- + //-------------------------------------------------------------------- template void @@ -444,10 +457,11 @@ ExtractStation_3P_LR_inf_Limits() inf : not Right to Azygousvein */ - StartNewStep("[Station 3P] Left/Right limits (inferior part) "); + StartNewStep("[Station 3P] Left/Right limits (inferior part) with Azygousvein and Aorta"); // Load structures MaskImagePointer AzygousVein = GetAFDB()->template GetImage("AzygousVein"); + MaskImagePointer Aorta = GetAFDB()->template GetImage("Aorta"); typedef clitk::AddRelativePositionConstraintToLabelImageFilter RelPosFilterType; typename RelPosFilterType::Pointer relPosFilter = RelPosFilterType::New(); @@ -465,6 +479,19 @@ ExtractStation_3P_LR_inf_Limits() relPosFilter->Update(); m_Working_Support = relPosFilter->GetOutput(); + writeImage(m_Working_Support, "before-L-aorta.mhd"); + relPosFilter->SetInput(m_Working_Support); + relPosFilter->SetInputObject(Aorta); + relPosFilter->AddOrientationTypeString("L"); + relPosFilter->SetInverseOrientationFlag(true); + // relPosFilter->SetIntermediateSpacing(3); + relPosFilter->SetIntermediateSpacingFlag(false); + relPosFilter->SetFuzzyThreshold(0.7); + relPosFilter->AutoCropFlagOn(); + relPosFilter->Update(); + m_Working_Support = relPosFilter->GetOutput(); + writeImage(m_Working_Support, "after-L-aorta.mhd"); + StopCurrentStep(m_Working_Support); m_ListOfStations["3P"] = m_Working_Support; }