| 65 | } |
| 66 | |
| 67 | bool mitk::GrowCutTool::SeedImageIsValid() |
| 68 | { |
| 69 | if (nullptr == this->GetToolManager()->GetWorkingData(0)) |
| 70 | { |
| 71 | return false; |
| 72 | } |
| 73 | |
| 74 | auto *workingDataLabelSetImage = |
| 75 | dynamic_cast<mitk::MultiLabelSegmentation *>(this->GetToolManager()->GetWorkingData(0)->GetData()); |
| 76 | |
| 77 | if (nullptr == workingDataLabelSetImage) |
| 78 | { |
| 79 | return false; |
| 80 | } |
| 81 | |
| 82 | auto numberOfLabels = workingDataLabelSetImage->GetNumberOfLabels(workingDataLabelSetImage->GetActiveLayer()); |
| 83 | |
| 84 | if (numberOfLabels >= 2) |
| 85 | { |
| 86 | return true; |
| 87 | } |
| 88 | |
| 89 | return false; |
| 90 | } |
| 91 | |
| 92 | void mitk::GrowCutTool::DoUpdatePreview(const Image *inputAtTimeStep, |
| 93 | const Image * oldSegAtTimeStep, |
no test coverage detected