Set the bounds */
| 138 | |
| 139 | /** Set the bounds */ |
| 140 | void mitk::BaseGeometry::SetBounds(const BoundsArrayType &bounds) |
| 141 | { |
| 142 | mitk::ModifiedLock lock(this); |
| 143 | |
| 144 | this->CheckBounds(bounds); |
| 145 | |
| 146 | m_BoundingBox = BoundingBoxType::New(); |
| 147 | |
| 148 | BoundingBoxType::PointsContainer::Pointer pointscontainer = BoundingBoxType::PointsContainer::New(); |
| 149 | BoundingBoxType::PointType p; |
| 150 | BoundingBoxType::PointIdentifier pointid; |
| 151 | |
| 152 | for (pointid = 0; pointid < 2; ++pointid) |
| 153 | { |
| 154 | unsigned int i; |
| 155 | for (i = 0; i < m_NDimensions; ++i) |
| 156 | { |
| 157 | p[i] = bounds[2 * i + pointid]; |
| 158 | } |
| 159 | pointscontainer->InsertElement(pointid, p); |
| 160 | } |
| 161 | |
| 162 | m_BoundingBox->SetPoints(pointscontainer); |
| 163 | m_BoundingBox->ComputeBoundingBox(); |
| 164 | this->Modified(); |
| 165 | } |
| 166 | |
| 167 | void mitk::BaseGeometry::SetIndexToWorldTransform(mitk::AffineTransform3D *transform) |
| 168 | { |