Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
DataStructure which stores a set of points (incl. pointdata) where each point can be associated to an element of a cell. More...
#include <mitkMesh.h>
Public Types | |
typedef Superclass::DataType::CellType | CellType |
typedef CellType::CellAutoPointer | CellAutoPointer |
typedef Superclass::MeshTraits::CellTraits | CellTraits |
typedef CellTraits::PointIdConstIterator | PointIdConstIterator |
typedef CellTraits::PointIdIterator | PointIdIterator |
typedef DataType::CellDataContainer | CellDataContainer |
typedef DataType::CellDataContainerIterator | CellDataIterator |
typedef Superclass::DataType::CellsContainer::Iterator | CellIterator |
typedef Superclass::DataType::CellsContainer::ConstIterator | ConstCellIterator |
typedef itk::PolygonCell< CellType > | PolygonType |
typedef MeshType::CellType::MultiVisitor | MeshMultiVisitor |
Public Types inherited from mitk::PointSet | |
typedef PointSet | Self |
typedef BaseData | Superclass |
typedef itk::SmartPointer< Self > | Pointer |
typedef itk::SmartPointer< const Self > | ConstPointer |
typedef mitk::ScalarType | CoordinateType |
typedef mitk::ScalarType | InterpolationWeightType |
typedef std::vector< unsigned int > | SelectedLinesType |
cellDataType, that stores all indexes of the lines, that are selected e.g.: points A,B and C.Between A and B there is a line with index 0. If vector of cellData contains 1 and 2, then the lines between B and C and C and A is selected. More... | |
typedef SelectedLinesType::iterator | SelectedLinesIter |
typedef itk::DefaultDynamicMeshTraits< PointDataType, PointDimension, MaxTopologicalDimension, CoordinateType, InterpolationWeightType, CellDataType > | MeshTraits |
typedef itk::Mesh< PointDataType, PointDimension, MeshTraits > | MeshType |
typedef MeshType | DataType |
typedef Point3D | PointType |
typedef DataType::PointIdentifier | PointIdentifier |
typedef DataType::PointsContainer | PointsContainer |
typedef DataType::PointsContainerIterator | PointsIterator |
typedef DataType::PointsContainer::ConstIterator | PointsConstIterator |
typedef DataType::PointDataContainer | PointDataContainer |
typedef DataType::PointDataContainerIterator | PointDataIterator |
typedef DataType::PointDataContainerIterator | PointDataConstIterator |
Public Types inherited from mitk::BaseData | |
typedef BaseData | Self |
typedef itk::DataObject | Superclass |
typedef itk::SmartPointer< Self > | Pointer |
typedef itk::SmartPointer< const Self > | ConstPointer |
Public Member Functions | |
mitkClassMacro (Mesh, PointSet) | |
Pointer | Clone () const |
virtual unsigned long | GetNumberOfCells (int t=0) |
returns the current number of cells in the mesh More... | |
virtual const DataType * | GetMesh (int t=0) const |
returns the mesh More... | |
virtual DataType * | GetMesh (int t=0) |
returns the mesh More... | |
void | SetMesh (DataType *mesh, int t=0) |
virtual bool | EvaluatePosition (Point3D point, unsigned long &cellId, float precision, int t=0) |
checks if the given point is in a cell and returns that cellId. Basicaly it searches lines and points that are hit. More... | |
unsigned long | GetNewCellId (int t=0) |
searches for the next new cellId and returns that id More... | |
virtual int | SearchFirstCell (unsigned long pointId, int t=0) |
returns the first cell that includes the given pointId More... | |
virtual bool | SearchLine (Point3D point, float distance, unsigned long &lineId, unsigned long &cellId, int t=0) |
searches for a line, that is hit by the given point. Then returns the lineId and the cellId More... | |
virtual bool | GetPointIds (unsigned long cellId, unsigned long lineId, int &idA, int &idB, int t=0) |
searches a line according to the cellId and lineId and returns the PointIds, that assign the line; if successful, then return param = true; More... | |
virtual int | SearchSelectedCell (int t=0) |
searches a selected cell and returns the id of that cell. If no cell is found, then -1 is returned More... | |
virtual DataType::BoundingBoxPointer | GetBoundingBoxFromCell (unsigned long cellId, int t=0) |
creates a BoundingBox and computes it with the given points of the cell. More... | |
virtual void | ExecuteOperation (Operation *operation) override |
executes the given Operation More... | |
Public Member Functions inherited from mitk::PointSet | |
virtual std::vector< std::string > | GetClassHierarchy () const override |
virtual const char * | GetClassName () const |
Pointer | Clone () const |
virtual void | Expand (unsigned int timeSteps) override |
Expands the TimeGeometry to a number of TimeSteps. More... | |
virtual int | GetSize (unsigned int t=0) const |
returns the current size of the point-list More... | |
virtual unsigned int | GetPointSetSeriesSize () const |
virtual DataType::Pointer | GetPointSet (int t=0) const |
returns the pointset More... | |
PointsIterator | Begin (int t=0) |
PointsConstIterator | Begin (int t=0) const |
PointsIterator | End (int t=0) |
PointsConstIterator | End (int t=0) const |
PointsIterator | GetMaxId (int t=0) |
Get an iterator to the max ID element if existent. Return End() otherwise. More... | |
PointType | GetPoint (PointIdentifier id, int t=0) const |
Get the point with ID id in world coordinates. More... | |
bool | GetPointIfExists (PointIdentifier id, PointType *point, int t=0) const |
Get the point with ID id in world coordinates. More... | |
void | SetPoint (PointIdentifier id, PointType point, int t=0) |
Set the given point in world coordinate system into the itkPointSet. More... | |
void | SetPoint (PointIdentifier id, PointType point, PointSpecificationType spec, int t=0) |
Set the given point in world coordinate system with the given PointSpecificationType. More... | |
void | InsertPoint (PointIdentifier id, PointType point, int t=0) |
Set the given point in world coordinate system into the itkPointSet. More... | |
void | InsertPoint (PointIdentifier id, PointType point, PointSpecificationType spec, int t) |
Set the given point in world coordinate system with given PointSpecificationType. More... | |
PointIdentifier | InsertPoint (PointType point, int t=0) |
Insert the given point in world coordinate system with incremented max id at time step t. More... | |
bool | RemovePointIfExists (PointIdentifier id, int t=0) |
Remove point with given id at timestep t, if existent. More... | |
PointsIterator | RemovePointAtEnd (int t=0) |
Remove max id point at timestep t and return iterator to precedent point. More... | |
bool | SwapPointPosition (PointIdentifier id, bool moveUpwards, int t=0) |
Swap a point at the given position (id) with the upper point (moveUpwards=true) or with the lower point (moveUpwards=false). If upper or lower index does not exist false is returned, if swap was successful true. More... | |
virtual int | SearchSelectedPoint (int t=0) const |
searches a selected point and returns the id of that point. If no point is found, then -1 is returned More... | |
virtual bool | IndexExists (int position, int t=0) const |
returns true if a point exists at this position More... | |
virtual bool | GetSelectInfo (int position, int t=0) const |
to get the state selected/unselected of the point on the position More... | |
virtual void | SetSelectInfo (int position, bool selected, int t=0) |
virtual PointSpecificationType | GetSpecificationTypeInfo (int position, int t) const |
to get the type of the point at the position and the moment More... | |
virtual int | GetNumberOfSelected (int t=0) const |
returns the number of selected points More... | |
int | SearchPoint (Point3D point, ScalarType distance, int t=0) const |
searches a point in the list == point +/- distance More... | |
virtual bool | IsEmptyTimeStep (unsigned int t) const override |
Check whether object contains data (at a specified time), e.g., a set of points may be empty. More... | |
virtual void | UpdateOutputInformation () override |
virtual void | SetRequestedRegionToLargestPossibleRegion () override |
Set the RequestedRegion to the LargestPossibleRegion. More... | |
virtual bool | RequestedRegionIsOutsideOfTheBufferedRegion () override |
Determine whether the RequestedRegion is outside of the BufferedRegion. More... | |
virtual bool | VerifyRequestedRegion () override |
Verify that the RequestedRegion is within the LargestPossibleRegion. More... | |
virtual void | SetRequestedRegion (const itk::DataObject *data) override |
Set the requested region from this data object to match the requested region of the data object passed in as a parameter. More... | |
virtual void | OnPointSetChange () |
Public Member Functions inherited from mitk::BaseData | |
const mitk::TimeGeometry * | GetTimeGeometry () const |
Return the TimeGeometry of the data as const pointer. More... | |
const mitk::TimeGeometry * | GetTimeSlicedGeometry () const |
Return the TimeGeometry of the data as const pointer. More... | |
mitk::TimeGeometry * | GetTimeGeometry () |
Return the TimeGeometry of the data as pointer. More... | |
const mitk::TimeGeometry * | GetUpdatedTimeGeometry () |
Return the TimeGeometry of the data. More... | |
const mitk::TimeGeometry * | GetUpdatedTimeSliceGeometry () |
Return the TimeGeometry of the data. More... | |
const mitk::BaseGeometry * | GetUpdatedGeometry (int t=0) |
Return the BaseGeometry of the data at time t. More... | |
mitk::BaseGeometry * | GetGeometry (int t=0) const |
Return the geometry, which is a TimeGeometry, of the data as non-const pointer. More... | |
void | UpdateOutputInformation () override |
Update the information for this BaseData (the geometry in particular) so that it can be used as an output of a BaseProcess. More... | |
void | CopyInformation (const itk::DataObject *data) override |
Copy information from the specified data set. More... | |
virtual bool | IsInitialized () const |
Check whether the data has been initialized, i.e., at least the Geometry and other header data has been set. More... | |
virtual void | Clear () |
Calls ClearData() and InitializeEmpty();. More... | |
virtual bool | IsEmpty () const |
Check whether object contains data (at least at one point in time), e.g., a set of points may be empty. More... | |
virtual void | SetGeometry (BaseGeometry *aGeometry3D) |
Set the BaseGeometry of the data, which will be referenced (not copied!). Assumes the data object has only 1 time step ( is a 3D object ) and creates a new TimeGeometry which saves the given BaseGeometry. If an TimeGeometry has already been set for the object, it will be replaced after calling this function. More... | |
virtual void | SetTimeGeometry (TimeGeometry *geometry) |
Set the TimeGeometry of the data, which will be referenced (not copied!). More... | |
virtual void | SetClonedGeometry (const BaseGeometry *aGeometry3D) |
Set a clone of the provided TimeGeometry as TimeGeometry of the data. Assumes the data object has only 1 time step ( is a 3D object ) and creates a new TimeGeometry. If an TimeGeometry has already been set for the object, it will be replaced after calling this function. More... | |
virtual void | SetClonedTimeGeometry (const TimeGeometry *geometry) |
Set a clone of the provided TimeGeometry as TimeGeometry of the data. More... | |
virtual void | SetClonedGeometry (const BaseGeometry *aGeometry3D, unsigned int time) |
Set a clone of the provided geometry as BaseGeometry of a given time step. More... | |
mitk::PropertyList::Pointer | GetPropertyList () const |
Get the data's property list. More... | |
void | SetPropertyList (PropertyList *propertyList) |
Set the data's property list. More... | |
mitk::BaseProperty::Pointer | GetProperty (const char *propertyKey) const |
Get the property (instance of BaseProperty) with key propertyKey from the PropertyList, and set it to this, respectively;. More... | |
void | SetProperty (const char *propertyKey, BaseProperty *property) |
virtual void | SetOrigin (const Point3D &origin) |
Convenience method for setting the origin of the BaseGeometry instances of all time steps. More... | |
itk::SmartPointer< mitk::BaseDataSource > | GetSource () const |
Get the process object that generated this data object. More... | |
unsigned int | GetTimeSteps () const |
Get the number of time steps from the TimeGeometry As the base data has not a data vector given by itself, the number of time steps is defined over the time sliced geometry. In sub classes, a better implementation could be over the length of the data vector. More... | |
virtual unsigned long | GetMTime () const override |
Get the modified time of the last change of the contents this data object or its geometry. More... | |
virtual void | Graft (const DataObject *) override |
Public Member Functions inherited from mitk::OperationActor | |
itkTypeMacroNoParent (OperationActor) virtual ~OperationActor() | |
Static Public Member Functions | |
static Pointer | New () |
Static Public Member Functions inherited from mitk::PointSet | |
static const char * | GetStaticNameOfClass () |
static Pointer | New () |
Static Public Member Functions inherited from mitk::BaseData | |
static const char * | GetStaticNameOfClass () |
Protected Member Functions | |
Mesh () | |
virtual | ~Mesh () |
Protected Member Functions inherited from mitk::PointSet | |
virtual itk::LightObject::Pointer | InternalClone () const override |
PointSet () | |
PointSet (const PointSet &other) | |
virtual | ~PointSet () |
virtual void | PrintSelf (std::ostream &os, itk::Indent indent) const override |
print content of the object to os More... | |
virtual void | ClearData () override |
reset to non-initialized state, release memory More... | |
virtual void | InitializeEmpty () override |
Pure virtual; Must be used in subclasses to get a data object to a valid state. Should at least create one empty object and call Superclass::InitializeTimeGeometry() to ensure an existing valid geometry. More... | |
bool | SwapPointContents (PointIdentifier id1, PointIdentifier id2, int t=0) |
swaps point coordinates and point data of the points with identifiers id1 and id2 More... | |
Protected Member Functions inherited from mitk::BaseData | |
BaseData () | |
BaseData (const BaseData &other) | |
~BaseData () | |
virtual void | InitializeTimeGeometry (unsigned int timeSteps=1) |
Initialize the TimeGeometry for a number of time steps. The TimeGeometry is initialized empty and evenly timed. In many cases it will be necessary to overwrite this in sub-classes. More... | |
virtual void | InitializeTimeSlicedGeometry (unsigned int timeSteps=1) |
Initialize the TimeGeometry for a number of time steps. The TimeGeometry is initialized empty and evenly timed. In many cases it will be necessary to overwrite this in sub-classes. More... | |
Additional Inherited Members | |
Static Public Attributes inherited from mitk::PointSet | |
static const unsigned int | PointDimension |
static const unsigned int | MaxTopologicalDimension |
Protected Types inherited from mitk::PointSet | |
typedef std::vector< DataType::Pointer > | PointSetSeries |
Protected Attributes inherited from mitk::PointSet | |
PointSetSeries | m_PointSetSeries |
DataType::PointsContainer::Pointer | m_EmptyPointsContainer |
bool | m_CalculateBoundingBox |
flag to indicate the right time to call SetBounds More... | |
Protected Attributes inherited from mitk::BaseData | |
bool | m_LastRequestedRegionWasOutsideOfTheBufferedRegion |
unsigned int | m_SourceOutputIndexDuplicate |
bool | m_Initialized |
DataStructure which stores a set of points (incl. pointdata) where each point can be associated to an element of a cell.
A mesh contains several cells that can be of different celltypes (Line, Triangle, Polygone...). A cell is always closed. If a linestrip is to be created, then declare several cells, each containing one line.
The operations take care of the coherence. If a line is added to an existing LineCell, then a TriangleCell is built with the old and the new parameter (and so on). Deletion is done the opposite way.
Example for inserting a line into a TriangleCell: existing PIds ind the cell: 1, 2, 4; inserting (2, 3) so that new PIds in Cell: 1, 2, 3, 4
The cell is now of type QuadrilateralCell
Definition at line 54 of file mitkMesh.h.
typedef CellType::CellAutoPointer mitk::Mesh::CellAutoPointer |
Definition at line 62 of file mitkMesh.h.
typedef DataType::CellDataContainer mitk::Mesh::CellDataContainer |
Definition at line 66 of file mitkMesh.h.
typedef DataType::CellDataContainerIterator mitk::Mesh::CellDataIterator |
Definition at line 67 of file mitkMesh.h.
typedef Superclass::DataType::CellsContainer::Iterator mitk::Mesh::CellIterator |
Definition at line 68 of file mitkMesh.h.
typedef Superclass::MeshTraits::CellTraits mitk::Mesh::CellTraits |
Definition at line 63 of file mitkMesh.h.
typedef Superclass::DataType::CellType mitk::Mesh::CellType |
Definition at line 61 of file mitkMesh.h.
typedef Superclass::DataType::CellsContainer::ConstIterator mitk::Mesh::ConstCellIterator |
Definition at line 69 of file mitkMesh.h.
typedef MeshType::CellType::MultiVisitor mitk::Mesh::MeshMultiVisitor |
Definition at line 71 of file mitkMesh.h.
typedef CellTraits::PointIdConstIterator mitk::Mesh::PointIdConstIterator |
Definition at line 64 of file mitkMesh.h.
typedef CellTraits::PointIdIterator mitk::Mesh::PointIdIterator |
Definition at line 65 of file mitkMesh.h.
typedef itk::PolygonCell<CellType> mitk::Mesh::PolygonType |
Definition at line 70 of file mitkMesh.h.
|
protected |
Definition at line 29 of file mitkMesh.cpp.
|
protectedvirtual |
Definition at line 33 of file mitkMesh.cpp.
Pointer mitk::Mesh::Clone | ( | ) | const |
|
virtual |
checks if the given point is in a cell and returns that cellId. Basicaly it searches lines and points that are hit.
Definition at line 154 of file mitkMesh.cpp.
|
overridevirtual |
executes the given Operation
Reimplemented from mitk::PointSet.
Definition at line 256 of file mitkMesh.cpp.
References mitk::PointSet::CellDataType::closed, mitk::StatusBar::DisplayText(), mitk::CellOperation::GetCellId(), mitk::LineOperation::GetId(), mitk::StatusBar::GetInstance(), mitk::Operation::GetOperationType(), mitk::LineOperation::GetPIdA(), mitk::LineOperation::GetPIdB(), mitk::CellOperation::GetVector(), mitk::OpADDLINE, mitk::OpCLOSECELL, mitk::OpDELETECELL, mitk::OpDELETELINE, mitk::OpDESELECTCELL, mitk::OpDESELECTLINE, mitk::OpINSERTLINE, mitk::OpMOVE, mitk::OpMOVECELL, mitk::OpMOVELINE, mitk::OpNEWCELL, mitk::OpNOTHING, mitk::OpOPENCELL, mitk::OpREMOVELINE, mitk::OpSELECTCELL, mitk::OpSELECTLINE, mitk::PointSet::CellDataType::selected, and mitk::PointSet::CellDataType::selectedLines.
|
virtual |
creates a BoundingBox and computes it with the given points of the cell.
Returns the BoundingBox != IsNull() if successful.
Definition at line 786 of file mitkMesh.cpp.
References mitk::New().
|
virtual |
returns the mesh
Definition at line 37 of file mitkMesh.cpp.
|
virtual |
returns the mesh
Definition at line 42 of file mitkMesh.cpp.
unsigned long mitk::Mesh::GetNewCellId | ( | int | t = 0 | ) |
searches for the next new cellId and returns that id
Definition at line 172 of file mitkMesh.cpp.
|
virtual |
returns the current number of cells in the mesh
Definition at line 53 of file mitkMesh.cpp.
|
virtual |
searches a line according to the cellId and lineId and returns the PointIds, that assign the line; if successful, then return param = true;
Definition at line 205 of file mitkMesh.cpp.
References mitk::PointSet::CellDataType::closed.
|
static |
Referenced by mitkMeshTest().
|
virtual |
returns the first cell that includes the given pointId
Definition at line 132 of file mitkMesh.cpp.
|
virtual |
searches for a line, that is hit by the given point. Then returns the lineId and the cellId
Definition at line 59 of file mitkMesh.cpp.
References mitk::PointSet::CellDataType::closed, and line.
|
virtual |
searches a selected cell and returns the id of that cell. If no cell is found, then -1 is returned
Definition at line 187 of file mitkMesh.cpp.
void mitk::Mesh::SetMesh | ( | DataType * | mesh, |
int | t = 0 |
||
) |
Definition at line 47 of file mitkMesh.cpp.