| 13 | #include <mitkImageSliceSelector.h> |
| 14 | |
| 15 | void mitk::ImageSliceSelector::GenerateOutputInformation() |
| 16 | { |
| 17 | mitk::Image::ConstPointer input = this->GetInput(); |
| 18 | mitk::Image::Pointer output = this->GetOutput(); |
| 19 | |
| 20 | itkDebugMacro(<< "GenerateOutputInformation()"); |
| 21 | |
| 22 | output->Initialize(input->GetPixelType(), 2, input->GetDimensions()); |
| 23 | |
| 24 | if ((unsigned int)m_SliceNr >= input->GetDimension(2)) |
| 25 | { |
| 26 | m_SliceNr = input->GetDimension(2) - 1; |
| 27 | } |
| 28 | |
| 29 | if ((unsigned int)m_TimeNr >= input->GetDimension(3)) |
| 30 | { |
| 31 | m_TimeNr = input->GetDimension(3) - 1; |
| 32 | } |
| 33 | |
| 34 | // initialize geometry |
| 35 | output->SetGeometry(dynamic_cast<BaseGeometry *>( |
| 36 | input->GetSlicedGeometry(m_TimeNr)->GetPlaneGeometry(m_SliceNr)->Clone().GetPointer())); |
| 37 | output->SetPropertyList(input->GetPropertyList()->Clone()); |
| 38 | } |
| 39 | |
| 40 | void mitk::ImageSliceSelector::GenerateData() |
| 41 | { |
nothing calls this directly
no test coverage detected