- if (GetComputeStationsSupportsFlag()) {
- StartNewStep("Supports for stations");
- StartSubStep();
- GetAFDB()->RemoveTag("CarinaZ");
- GetAFDB()->RemoveTag("ApexOfTheChestZ");
- GetAFDB()->RemoveTag("ApexOfTheChest");
- GetAFDB()->RemoveTag("RightBronchus");
- GetAFDB()->RemoveTag("LeftBronchus");
- GetAFDB()->RemoveTag("SuperiorBorderOfAorticArchZ");
- GetAFDB()->RemoveTag("SuperiorBorderOfAorticArch");
- GetAFDB()->RemoveTag("InferiorBorderOfAorticArchZ");
- GetAFDB()->RemoveTag("InferiorBorderOfAorticArch");
- ExtractStationSupports();
- StopSubStep();
- }
- else {
- m_ListOfSupports["S1R"] = GetAFDB()->template GetImage<MaskImageType>("Support_S1R");
- m_ListOfSupports["S1L"] = GetAFDB()->template GetImage<MaskImageType>("Support_S1L");
- m_ListOfSupports["S2R"] = GetAFDB()->template GetImage<MaskImageType>("Support_S2R");
- m_ListOfSupports["S2L"] = GetAFDB()->template GetImage<MaskImageType>("Support_S2L");
- m_ListOfSupports["S4R"] = GetAFDB()->template GetImage<MaskImageType>("Support_S4R");
- m_ListOfSupports["S4L"] = GetAFDB()->template GetImage<MaskImageType>("Support_S4L");
-
- m_ListOfSupports["S3A"] = GetAFDB()->template GetImage<MaskImageType>("Support_S3A");
- m_ListOfSupports["S3P"] = GetAFDB()->template GetImage<MaskImageType>("Support_S3P");
- m_ListOfSupports["S5"] = GetAFDB()->template GetImage<MaskImageType>("Support_S5");
- m_ListOfSupports["S6"] = GetAFDB()->template GetImage<MaskImageType>("Support_S6");
- m_ListOfSupports["S7"] = GetAFDB()->template GetImage<MaskImageType>("Support_S7");
- m_ListOfSupports["S8"] = GetAFDB()->template GetImage<MaskImageType>("Support_S8");
- m_ListOfSupports["S9"] = GetAFDB()->template GetImage<MaskImageType>("Support_S9");
- m_ListOfSupports["S10"] = GetAFDB()->template GetImage<MaskImageType>("Support_S10");
- m_ListOfSupports["S11"] = GetAFDB()->template GetImage<MaskImageType>("Support_S11");
+ bool supportsExist = true;
+ try {
+ m_ListOfSupports["S1R"] = this->GetAFDB()->template GetImage<MaskImageType>("Support_S1R");
+ m_ListOfSupports["S1L"] = this->GetAFDB()->template GetImage<MaskImageType>("Support_S1L");
+ m_ListOfSupports["S2R"] = this->GetAFDB()->template GetImage<MaskImageType>("Support_S2R");
+ m_ListOfSupports["S2L"] = this->GetAFDB()->template GetImage<MaskImageType>("Support_S2L");
+ m_ListOfSupports["S4R"] = this->GetAFDB()->template GetImage<MaskImageType>("Support_S4R");
+ m_ListOfSupports["S4L"] = this->GetAFDB()->template GetImage<MaskImageType>("Support_S4L");
+
+ m_ListOfSupports["S3A"] = this->GetAFDB()->template GetImage<MaskImageType>("Support_S3A");
+ m_ListOfSupports["S3P"] = this->GetAFDB()->template GetImage<MaskImageType>("Support_S3P");
+ m_ListOfSupports["S5"] = this->GetAFDB()->template GetImage<MaskImageType>("Support_S5");
+ m_ListOfSupports["S6"] = this->GetAFDB()->template GetImage<MaskImageType>("Support_S6");
+ m_ListOfSupports["S7"] = this->GetAFDB()->template GetImage<MaskImageType>("Support_S7");
+ m_ListOfSupports["S8"] = this->GetAFDB()->template GetImage<MaskImageType>("Support_S8");
+ m_ListOfSupports["S9"] = this->GetAFDB()->template GetImage<MaskImageType>("Support_S9");
+ m_ListOfSupports["S10"] = this->GetAFDB()->template GetImage<MaskImageType>("Support_S10");
+ m_ListOfSupports["S11"] = this->GetAFDB()->template GetImage<MaskImageType>("Support_S11");
+ } catch(clitk::ExceptionObject o) {
+ supportsExist = false;