24 itkDebugMacro(<<
"GenerateOutputInformation()");
26 output->Initialize(input->GetPixelType(), 2, input->GetDimensions());
28 if ((
unsigned int)
m_SliceNr >= input->GetDimension(2))
33 if ((
unsigned int)
m_TimeNr >= input->GetDimension(3))
35 m_TimeNr = input->GetDimension(3) - 1;
39 output->SetGeometry(dynamic_cast<BaseGeometry *>(
40 input->GetSlicedGeometry(
m_TimeNr)->GetPlaneGeometry(
m_SliceNr)->Clone().GetPointer()));
41 output->SetPropertyList(input->GetPropertyList()->Clone());
46 SetSliceItem(GetSliceData(m_SliceNr, m_TimeNr, m_ChannelNr), 0);
59 Superclass::GenerateInputRequestedRegion();
66 requestedRegion = output->GetRequestedRegion();
67 requestedRegion.SetIndex(2, m_SliceNr);
68 requestedRegion.SetIndex(3, m_TimeNr);
69 requestedRegion.SetIndex(4, m_ChannelNr);
70 requestedRegion.SetSize(2, 1);
71 requestedRegion.SetSize(3, 1);
72 requestedRegion.SetSize(4, 1);
74 input->SetRequestedRegion(&requestedRegion);
virtual void GenerateInputRequestedRegion() override
virtual ~ImageSliceSelector()
virtual void GenerateData() override
A version of GenerateData() specific for image processing filters.
itk::ImageRegion< RegionDimension > RegionType
Image class for storing images.
InputImageType * GetInput(void)
OutputType * GetOutput()
Get the output data of this image source object.
virtual void GenerateOutputInformation() override