void mitk::TimeGeometry::UpdateBoundingBox ()
{
  assert(m_BoundingBox.IsNotNull());
  typedef BoundingBox::PointsContainer ContainerType;

  unsigned long lastModifiedTime = 0;
  unsigned long currentModifiedTime = 0;

  ContainerType::Pointer points = ContainerType::New();
  points->reserve(2*CountTimeSteps());
  for (TimeStepType step = 0; step <CountTimeSteps(); ++step)
  {
    currentModifiedTime = GetGeometryForTimeStep(step)->GetMTime();
    if (currentModifiedTime > lastModifiedTime)
      lastModifiedTime = currentModifiedTime;

    for (int i=0; i < 8; ++i)
    {
      Point3D cornerPoint = GetGeometryForTimeStep(step)->GetCornerPoint(i);
      points->push_back(cornerPoint);
    }
  }
  m_BoundingBox->SetPoints(points);
  m_BoundingBox->ComputeBoundingBox();
  if (this->GetMTime() < lastModifiedTime)
    this->Modified();
}