32 itkDebugMacro(<<
"GenerateOutputInformation()");
34 int dim = (input->GetDimension() < 3 ? input->GetDimension() : 3);
35 output->Initialize(input->GetPixelType(), dim, input->GetDimensions());
37 if ((
unsigned int)m_TimeNr >= input->GetDimension(3))
39 m_TimeNr = input->GetDimension(3) - 1;
44 if (sliced_geo.IsNull())
46 mitkThrow() <<
"Failed to retrieve SlicedGeometry from input at timestep " << m_TimeNr;
50 if (sliced_geo_clone.IsNull())
52 mitkThrow() <<
"Failed to clone the retrieved sliced geometry.";
56 if (geom_3d.IsNotNull())
58 output->SetGeometry(geom_3d.GetPointer());
62 mitkThrow() <<
"Failed to cast the retrieved SlicedGeometry to a Geometry3D object.";
65 output->SetPropertyList(input->GetPropertyList()->Clone());
70 const Image::RegionType &requestedRegion = this->GetOutput()->GetRequestedRegion();
73 if (requestedRegion.GetSize(2) > 1)
77 im->SetManageMemory(0);
78 this->SetVolumeItem(im, 0);
83 this->GetSliceData(requestedRegion.GetIndex(2), m_TimeNr, m_ChannelNr), requestedRegion.GetIndex(2), 0);
88 Superclass::GenerateInputRequestedRegion();
95 requestedRegion = output->GetRequestedRegion();
96 requestedRegion.SetIndex(3, m_TimeNr);
97 requestedRegion.SetIndex(4, m_ChannelNr);
98 requestedRegion.SetSize(3, 1);
99 requestedRegion.SetSize(4, 1);
101 input->SetRequestedRegion(&requestedRegion);
virtual void GenerateData() override
A version of GenerateData() specific for image processing filters.
virtual void GenerateOutputInformation() override
virtual void GenerateInputRequestedRegion() override
virtual ~ImageTimeSelector()
itk::ImageRegion< RegionDimension > RegionType
Image class for storing images.
BaseGeometry Describes the geometry of a data object.