14 #include <vtkAbstractTransform.h> 50 itkExceptionMacro(<<
"m_Plane is nullptr.");
52 return m_Plane->GetExtentInMM(direction);
66 isInside =
Map(pt3d_mm, pt2d_mm);
67 Map(pt2d_mm, projectedPt3d_mm);
83 return m_Plane->Map(pt3d_units, pt2d_mm);
98 itkExceptionMacro(
"not implemented yet - replace GetIndexToWorldTransform by " 99 "m_ItkVtkAbstractTransform->GetInverseVtkAbstractTransform()");
111 for (j = 0; j < 3; ++j)
114 for (i = 0; i < 3; ++i)
118 for (j = 0; j < 3; ++j)
128 MITK_WARN <<
"Need additional point! No standard value defined. Please use Project(const mitk::Point3D & atPt3d_mm, " 129 "const mitk::Vector3D &vec3d_mm, mitk::Vector3D &projectedVec3d_mm). Unfortunatley this one is not " 130 "implemented at the moment. Sorry :(";
131 itkExceptionMacro(
"not implemented yet - replace GetIndexToWorldTransform by " 132 "m_ItkVtkAbstractTransform->GetInverseVtkAbstractTransform()");
148 return m_Plane->Map(atPt3d_mm, vec3d_units, vec2d_mm);
155 m_Plane->Map(atPt2d_mm, vec2d_mm, vec3d_mm);
157 Map(atPt2d_mm, atPt3d_mm);
158 float vtkpt[3], vtkvec[3];
167 m_Plane->IndexToWorld(pt_units, pt_mm);
172 m_Plane->WorldToIndex(pt_mm, pt_units);
179 MITK_WARN <<
"Warning! Call of the deprecated function AbstractTransformGeometry::IndexToWorld(point, vec, vec). Use " 180 "AbstractTransformGeometry::IndexToWorld(vec, vec) instead!";
186 m_Plane->IndexToWorld(vec_units, vec_mm);
193 MITK_WARN <<
"Warning! Call of the deprecated function AbstractTransformGeometry::WorldToIndex(point, vec, vec). Use " 194 "AbstractTransformGeometry::WorldToIndex(vec, vec) instead!";
200 m_Plane->WorldToIndex(vec_mm, vec_units);
223 if (aPlane !=
nullptr)
252 if ((frameGeometry !=
nullptr) && (frameGeometry->
IsValid()))
269 return Superclass::GetMTime();
276 itkExceptionMacro(<<
"m_Plane is not set.");
280 bounds[1] *= oversampling;
281 bounds[3] *= oversampling;
282 bounds[5] *= oversampling;
289 newGeometry->UnRegister();
290 return newGeometry.GetPointer();
297 BoundingBoxType::PointsContainer::Pointer pointscontainer = BoundingBoxType::PointsContainer::New();
298 BoundingBoxType::PointType p;
299 BoundingBoxType::PointIdentifier pointid;
301 for (pointid = 0; pointid < 2; ++pointid)
306 p[i] = bounds[2 * i + pointid];
308 pointscontainer->InsertElement(pointid, p);
324 if (direction < 0 || direction >= 3)
325 mitkThrow() <<
"Invalid direction. Must be between either 0, 1 or 2. ";
329 return bounds[direction * 2 + 1] - bounds[direction * 2];
void SetIndexToWorldTransform(mitk::AffineTransform3D *transform)
bool IsBoundingBoxNull() const
void Initialize()
Initialize the BaseGeometry.
void Modified() const override
Overload of function Modified() to prohibit several calls of Modified() using the ModifiedLock class...
void vtk2itk(const Tin &in, Tout &out)
virtual unsigned int GetNDimensions() const
virtual bool IsValid() const
Is this BaseGeometry in a state that is valid?
void itk2vtk(const Tin &in, Tout &out)
void SetBounds(const BoundsArrayType &bounds)
Set the bounding box (in index/unit coordinates)
Describes a two-dimensional, rectangular plane.
BaseGeometry Describes the geometry of a data object.
mitk::AffineTransform3D * GetIndexToWorldTransform()
Get the transformation used to convert from index to world coordinates.
BoundingBoxType::BoundsArrayType BoundsArrayType
virtual const BoundingBoxType * GetBoundingBox()