1 /*=========================================================================
2 Program: vv http://www.creatis.insa-lyon.fr/rio/vv
5 - University of LYON http://www.universite-lyon.fr/
6 - Léon Bérard cancer center http://www.centreleonberard.fr
7 - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr
9 This software is distributed WITHOUT ANY WARRANTY; without even
10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. See the copyright notices for more information.
13 It is distributed under dual licence
15 - BSD See included LICENSE.txt file
16 - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
17 ===========================================================================*/
19 #include <itkBinaryDilateImageFilter.h>
20 #include <itkMirrorPadImageFilter.h>
22 //--------------------------------------------------------------------
23 template <class ImageType>
25 clitk::ExtractLymphStationsFilter<ImageType>::
26 ExtractStation_3A_SetDefaultValues()
29 //--------------------------------------------------------------------
32 //--------------------------------------------------------------------
33 template <class ImageType>
35 clitk::ExtractLymphStationsFilter<ImageType>::
36 ExtractStation_3A_SI_Limits()
38 // Apex of the chest or Sternum & Carina.
39 StartNewStep("[Station 3A] Inf/Sup limits with Sternum and Carina");
41 // Get Carina position (has been determined in Station8)
42 m_CarinaZ = GetAFDB()->GetDouble("CarinaZ");
44 // Get Sternum and search for the upper position
45 MaskImagePointer Sternum = GetAFDB()->template GetImage<MaskImageType>("Sternum");
47 // Search most sup point
48 MaskImagePointType ps = Sternum->GetOrigin(); // initialise to avoid warning
49 clitk::FindExtremaPointInAGivenDirection<MaskImageType>(Sternum, GetBackgroundValue(), 2, false, ps);
50 double m_SternumZ = ps[2]+Sternum->GetSpacing()[2]; // One more slice, because it is below this point
54 clitk::CropImageAlongOneAxis<MaskImageType>(m_Working_Support, 2,
55 m_CarinaZ, m_SternumZ, true,
56 GetBackgroundValue());
58 StopCurrentStep<MaskImageType>(m_Working_Support);
59 m_ListOfStations["3A"] = m_Working_Support;
61 //--------------------------------------------------------------------
64 //--------------------------------------------------------------------
65 template <class ImageType>
67 clitk::ExtractLymphStationsFilter<ImageType>::
68 ExtractStation_3A_Ant_Limits()
70 StartNewStep("[Station 3A] Ant limits with Sternum");
72 // Get Sternum, keep posterior part.
73 MaskImagePointer Sternum = GetAFDB()->template GetImage<MaskImageType>("Sternum");
75 clitk::SliceBySliceRelativePosition<MaskImageType>(m_Working_Support, Sternum, 2,
77 false, 3, true, false);
78 StopCurrentStep<MaskImageType>(m_Working_Support);
79 m_ListOfStations["3A"] = m_Working_Support;
81 //--------------------------------------------------------------------