X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=segmentation%2FclitkExtractLymphStation_3A.txx;fp=segmentation%2FclitkExtractLymphStation_3A.txx;h=3e7005906131aafe6eb42fa1ca6aa2436a5fc20e;hb=907b0bad00cbf772fbf362879c74d673253f97bb;hp=0000000000000000000000000000000000000000;hpb=098881dd07627f89814aa56fcbd73c9519ae2f19;p=clitk.git diff --git a/segmentation/clitkExtractLymphStation_3A.txx b/segmentation/clitkExtractLymphStation_3A.txx new file mode 100644 index 0000000..3e70059 --- /dev/null +++ b/segmentation/clitkExtractLymphStation_3A.txx @@ -0,0 +1,66 @@ + +#include +#include + +//-------------------------------------------------------------------- +template +void +clitk::ExtractLymphStationsFilter:: +ExtractStation_3A_SetDefaultValues() +{ +} +//-------------------------------------------------------------------- + + +//-------------------------------------------------------------------- +template +void +clitk::ExtractLymphStationsFilter:: +ExtractStation_3A_SI_Limits() +{ + // Apex of the chest or Sternum & Carina. + StartNewStep("[Station 3A] Inf/Sup limits with Sternum and Carina"); + + // Get Carina position (has been determined in Station8) + m_CarinaZ = GetAFDB()->GetDouble("CarinaZ"); + + // Get Sternum and search for the upper position + MaskImagePointer Sternum = GetAFDB()->template GetImage("Sternum"); + + // Search most sup point + MaskImagePointType ps = Sternum->GetOrigin(); // initialise to avoid warning + clitk::FindExtremaPointInAGivenDirection(Sternum, GetBackgroundValue(), 2, false, ps); + double m_SternumZ = ps[2]+Sternum->GetSpacing()[2]; // One more slice, because it is below this point + + //* Crop support : + m_Working_Support = + clitk::CropImageAlongOneAxis(m_Working_Support, 2, + m_CarinaZ, m_SternumZ, true, + GetBackgroundValue()); + + StopCurrentStep(m_Working_Support); + m_ListOfStations["3A"] = m_Working_Support; +} +//-------------------------------------------------------------------- + + +//-------------------------------------------------------------------- +template +void +clitk::ExtractLymphStationsFilter:: +ExtractStation_3A_Ant_Limits() +{ + StartNewStep("[Station 3A] Ant limits with Sternum"); + + // Get Sternum, keep posterior part. + MaskImagePointer Sternum = GetAFDB()->template GetImage("Sternum"); + m_Working_Support = + clitk::SliceBySliceRelativePosition(m_Working_Support, Sternum, 2, + 0.5, "PostTo", + false, 3, true, false); + StopCurrentStep(m_Working_Support); + m_ListOfStations["3A"] = m_Working_Support; +} +//-------------------------------------------------------------------- + +