3 //-----------------------------------
6 - use DB from step to step or ExtractStation_7 mother class
7 - add "temporary flag" to DB to avoid write image
12 //-----------------------------------
13 #include "clitkAnatomicalFeatureDatabase.h"
15 class SegmentationStepBase;
17 class LymphStationSegmentationFilterBase:
18 public virtual clitk::FilterBase,
19 public clitk::FilterWithAnatomicalFeatureDatabaseManagement {
21 LymphStationSegmentationFilterBase() { DD("LymphStationSegmentationFilterBase const"); }
23 void AddStep(SegmentationStepBase * step) {
24 m_Steps.push_back(step);
27 std::vector<SegmentationStepBase*> m_Steps;
28 // AnatomicalFeatureDatabase * GetAFDB();
35 //-----------------------------------
38 class SegmentationStepBase
41 typedef itk::Image<unsigned char, 3> ImageType;
42 typedef ImageType::PointType ImagePointType;
44 SegmentationStepBase(std::string name);
45 virtual void StartStep();
46 void InitStep(LymphStationSegmentationFilterBase * p){
47 DD("SegmentationStepBase::InitStep");
51 LymphStationSegmentationFilterBase * parent;
54 SegmentationStepBase::SegmentationStepBase(std::string n) {
55 DD("SegmentationStepBase constructor");
60 void SegmentationStepBase::StartStep() {
61 DD("Start step (verbose debug skip)");
67 //-----------------------------------
69 class ExtractStation7_APLimits:public SegmentationStepBase {
71 typedef SegmentationStepBase Super;
72 ExtractStation7_APLimits():SegmentationStepBase("Step AP Limits") {}
73 virtual void StartStep();
74 // Accès au types ==> Super::
75 // Accès au AFDB ==> parent->
78 // , support, image // herit ; how to set ?
83 void ExtractStation7_APLimits::StartStep() {
84 Super::StartStep(); // -> needed to verbose, debug, skip etc
85 DD("ExtractStation7_APLimits StartStep");
86 Super::ImagePointType carina;
87 parent->GetAFDB()->GetPoint3D("carina", carina);
93 //-----------------------------------
96 // template <class TImageType>
97 class ExtractLymphStation_7:public LymphStationSegmentationFilterBase {
99 ExtractLymphStation_7() {
100 DD("ExtractStation_7 constructor");
101 // insert step (could be autolist if needed);
102 AddStep(new ExtractStation7_APLimits);
105 // SET GGO dont (AFDB);
107 void StartSegmentation() {
108 DD("ExtractStation_7 Start");
109 // Loop on list of SegmentationStepBase
110 m_Steps[0]->InitStep(this); // parent (donc AFFB)
111 m_Steps[0]->StartStep();
112 // things todo after a step ? -> if writeimage, to be done inside