21 for (i = 0; i < 4; ++i)
67 if (GetUpdateMTime() < GetPipelineMTime() || GetDataReleased())
81 for (i = 0; i < RegionDimension; ++i)
102 c = requestedRegionIndex[4];
103 cEnd = c +
static_cast<long>(requestedRegionSize[4]);
104 if (requestedRegionSize[3] == largestPossibleRegionSize[3])
106 for (; c < cEnd; ++c)
114 t = requestedRegionIndex[3];
115 tEnd = t +
static_cast<long>(requestedRegionSize[3]);
116 if (requestedRegionSize[2] == largestPossibleRegionSize[2])
118 for (; c < cEnd; ++c)
119 for (; t < tEnd; ++t)
127 s = requestedRegionIndex[2];
128 sEnd = s +
static_cast<long>(requestedRegionSize[2]);
129 for (; c < cEnd; ++c)
130 for (; t < tEnd; ++t)
131 for (; s < sEnd; ++s)
154 for (i = 0; i < RegionDimension; ++i)
156 if ((requestedRegionIndex[i] < largestPossibleRegionIndex[i]) ||
157 ((requestedRegionIndex[i] + static_cast<long>(requestedRegionSize[i])) >
158 (largestPossibleRegionIndex[i] + static_cast<long>(largestPossibleRegionSize[i]))))
181 itkExceptionMacro(<<
"mitk::SlicedData::SetRequestedRegion(DataObject*) cannot cast " <<
typeid(data).name()
191 if (region !=
nullptr)
199 itkExceptionMacro(<<
"mitk::SlicedData::SetRequestedRegion(SlicedData::RegionType*) cannot cast " 200 <<
typeid(region).name()
208 if (region !=
nullptr)
216 itkExceptionMacro(<<
"mitk::SlicedData::SetLargestPossibleRegion(SlicedData::RegionType*) cannot cast " 217 <<
typeid(region).name()
239 itkExceptionMacro(<<
"mitk::SlicedData::CopyInformation(const DataObject *data) cannot cast " <<
typeid(data).name()
272 if (aGeometry3D !=
nullptr)
276 if (slicedGeometry.IsNull())
278 auto *geometry2d =
dynamic_cast<PlaneGeometry *
>(aGeometry3D);
279 if (geometry2d !=
nullptr && dynamic_cast<mitk::AbstractTransformGeometry *>(aGeometry3D) ==
nullptr)
284 slicedGeometry->InitializeEvenlySpaced(geometry2d, 1);
290 planeGeometry->InitializeStandardPlane(aGeometry3D);
291 slicedGeometry->InitializeEvenlySpaced(planeGeometry, (
unsigned int)(aGeometry3D->
GetExtent(2)));
294 assert(slicedGeometry.IsNotNull());
296 timeGeometry->Initialize(slicedGeometry, 1);
316 assert(timeGeometry !=
nullptr);
322 for (
unsigned int timestep = 0; timestep < steps; ++timestep)
325 if (slicedGeometry !=
nullptr)
348 assert(timeGeometry !=
nullptr);
352 for (
unsigned int timestep = 0; timestep < steps; ++timestep)
355 if (slicedGeometry !=
nullptr)
void SetRequestedRegionToLargestPossibleRegion() override
void SetGeometry(BaseGeometry *aGeometry3D) override
Set the BaseGeometry of the data, which will be referenced (not copied!). It has to be a sub-class of...
itk::SmartPointer< mitk::BaseDataSource > GetSource() const
Get the process object that generated this data object.
virtual bool IsVolumeSet(int t=0, int n=0) const =0
virtual TimeStepType CountTimeSteps() const =0
Returns the number of time steps.
void SetSpacing(const mitk::Vector3D &aSpacing, bool enforceSetSpacing=false)
Set the spacing (m_Spacing).
Base of all data objects.
virtual void SetGeometry(BaseGeometry *aGeometry3D)
Set the BaseGeometry of the data, which will be referenced (not copied!). Assumes the data object has...
virtual void SetTimeGeometry(TimeGeometry *geometry)
Set the TimeGeometry of the data, which will be referenced (not copied!).
void SetRequestedRegion(const itk::DataObject *data) override
virtual unsigned int GetSlices() const
Get the number of slices.
ScalarType GetExtent(unsigned int direction) const
Set the time bounds (in ms)
RegionType m_RequestedRegion
void PrepareForNewData() override
bool m_UseLargestPossibleRegion
virtual void InitializeEvenlySpaced(mitk::PlaneGeometry *geometry2D, unsigned int slices)
Completely initialize this instance as evenly-spaced with slices parallel to the provided PlaneGeomet...
itk::Size< RegionDimension > SizeType
virtual bool GetEvenlySpaced() const
Set/Get whether the SlicedGeometry3D is evenly-spaced (m_EvenlySpaced)
virtual mitk::PlaneGeometry * GetPlaneGeometry(int s) const
Returns the PlaneGeometry of the slice (s).
void SetLargestPossibleRegion(SlicedData::RegionType *region)
Sets the largest possible region. The largest possible region is the entire region occupied by the da...
const mitk::TimeGeometry * GetTimeGeometry() const
Return the TimeGeometry of the data as const pointer.
void SetOrigin(const Point3D &origin) override
Convenience method for setting the origin of the SlicedGeometry3D instances of all time steps...
Super class of data objects consisting of slices.
itk::ImageRegion< RegionDimension > RegionType
void SetOrigin(const Point3D &origin)
Set the origin, i.e. the upper-left corner of the plane.
bool RequestedRegionIsOutsideOfTheBufferedRegion() override
SlicedGeometry3D * GetSlicedGeometry(unsigned int t=0) const
Convenience access method for the geometry, which is of type SlicedGeometry3D (or a sub-class of it)...
RegionType m_LargestPossibleRegion
void UpdateOutputInformation() override
Update the information for this BaseData (the geometry in particular) so that it can be used as an ou...
Describes the geometry of a data object consisting of slices.
bool m_LastRequestedRegionWasOutsideOfTheBufferedRegion
virtual bool IsSliceSet(int s=0, int t=0, int n=0) const =0
virtual bool IsChannelSet(int n=0) const =0
const SlicedGeometry3D * GetUpdatedSlicedGeometry(unsigned int t=0)
Convenience access method for the geometry, which is of type SlicedGeometry3D (or a sub-class of it)...
virtual BaseGeometry::Pointer GetGeometryForTimeStep(TimeStepType timeStep) const =0
Returns the geometry which corresponds to the given time step.
const RegionType & GetLargestPossibleRegion() const
bool m_RequestedRegionInitialized
Describes a two-dimensional, rectangular plane.
void UpdateOutputInformation() override
void Update()
Updates the geometry.
bool VerifyRequestedRegion() override
Verify that the RequestedRegion is within the LargestPossibleRegion.
mitk::BaseGeometry * GetGeometry(int t=0) const
Return the geometry, which is a TimeGeometry, of the data as non-const pointer.
BaseGeometry Describes the geometry of a data object.
RegionType m_BufferedRegion
virtual void SetSpacing(const ScalarType aSpacing[])
Convenience method for setting the spacing of the SlicedGeometry3D instances of all time steps...
void CopyInformation(const itk::DataObject *data) override
Copy information from the specified data set.
void CopyInformation(const itk::DataObject *data) override