|
IdentifierType | AddHexahedron (const CoordinateType *p0, const CoordinateType *p1, const CoordinateType *p2, const CoordinateType *p3, const CoordinateType *p4, const CoordinateType *p5, const CoordinateType *p6, const CoordinateType *p7) |
|
IdentifierType | AddHexahedron (const IdentifierArrayType &pointIDs) |
|
IdentifierType | AddHexahedron (const PointType &p0, const PointType &p1, const PointType &p2, const PointType &p3, const PointType &p4, const PointType &p5, const PointType &p6, const PointType &p7) |
|
IdentifierType | AddHexahedron (IdentifierType pointId0, IdentifierType pointId1, IdentifierType pointId2, IdentifierType pointId3, IdentifierType pointId4, IdentifierType pointId5, IdentifierType pointId6, IdentifierType pointId7) |
|
IdentifierType | AddLine (const CoordinateType *p0, const CoordinateType *p1) |
|
IdentifierType | AddLine (const IdentifierArrayType &pointIDs) |
|
IdentifierType | AddLine (const PointType &p0, const PointType &p1) |
|
IdentifierType | AddLine (IdentifierType pointId0, IdentifierType pointId1) |
|
IdentifierType | AddPoint (const CoordinateType *p0) |
|
IdentifierType | AddPoint (const PointType &p0) |
|
IdentifierType | AddPoint (CoordinateType x0=0, CoordinateType x1=0, CoordinateType x2=0, CoordinateType x3=0, CoordinateType x4=0, CoordinateType x5=0) |
|
IdentifierType | AddQuadrilateral (const CoordinateType *p0, const CoordinateType *p1, const CoordinateType *p2, const CoordinateType *p3) |
|
IdentifierType | AddQuadrilateral (const IdentifierArrayType &pointIDs) |
|
IdentifierType | AddQuadrilateral (const PointType &p0, const PointType &p1, const PointType &p2, const PointType &p3) |
|
IdentifierType | AddQuadrilateral (IdentifierType pointId0, IdentifierType pointId1, IdentifierType pointId2, IdentifierType pointId3) |
|
IdentifierType | AddTetrahedron (const CoordinateType *p0, const CoordinateType *p1, const CoordinateType *p2, const CoordinateType *p3) |
|
IdentifierType | AddTetrahedron (const IdentifierArrayType &pointIDs) |
|
IdentifierType | AddTetrahedron (const PointType &p0, const PointType &p1, const PointType &p2, const PointType &p3) |
|
IdentifierType | AddTetrahedron (IdentifierType pointId0, IdentifierType pointId1, IdentifierType pointId2, IdentifierType pointId3) |
|
IdentifierType | AddTriangle (const CoordinateType *p0, const CoordinateType *p1, const CoordinateType *p2) |
|
IdentifierType | AddTriangle (const IdentifierArrayType &pointIDs) |
|
IdentifierType | AddTriangle (const PointType &p0, const PointType &p1, const PointType &p2) |
|
IdentifierType | AddTriangle (IdentifierType pointId0, IdentifierType pointId1, IdentifierType pointId2) |
|
IdentifierType | AddVertex (const CoordinateType *p0) |
|
IdentifierType | AddVertex (const IdentifierArrayType &pointIDs) |
|
IdentifierType | AddVertex (const PointType &p0) |
|
IdentifierType | AddVertex (IdentifierType pointId0) |
|
virtual ::itk::LightObject::Pointer | CreateAnother () const |
|
virtual const char * | GetNameOfClass () const |
|
virtual ::itk::LightObject::Pointer | CreateAnother () const |
|
OutputMeshType * | GetOutput () |
|
OutputMeshType * | GetOutput (unsigned int idx) |
|
void | SetOutput (TOutputMesh *output) |
|
virtual void | GraftOutput (DataObject *graft) |
|
virtual void | GraftOutput (const DataObjectIdentifierType &key, DataObject *graft) |
|
virtual void | GraftNthOutput (unsigned int idx, DataObject *graft) |
|
DataObjectPointer | MakeOutput (DataObjectPointerArraySizeType idx) override |
|
virtual void | AbortGenerateDataOff () |
|
virtual void | AbortGenerateDataOn () |
|
virtual void | EnlargeOutputRequestedRegion (DataObject *) |
|
virtual const bool & | GetAbortGenerateData () const |
|
DataObjectPointerArray | GetIndexedInputs () |
|
DataObjectPointerArray | GetIndexedOutputs () |
|
NameArray | GetInputNames () const |
|
DataObjectPointerArray | GetInputs () |
|
DataObjectPointerArraySizeType | GetNumberOfIndexedInputs () const |
|
DataObjectPointerArraySizeType | GetNumberOfIndexedOutputs () const |
|
DataObjectPointerArraySizeType | GetNumberOfInputs () const |
|
DataObjectPointerArraySizeType | GetNumberOfOutputs () const |
|
virtual DataObjectPointerArraySizeType | GetNumberOfValidRequiredInputs () const |
|
NameArray | GetOutputNames () const |
|
DataObjectPointerArray | GetOutputs () |
|
virtual float | GetProgress () const |
|
NameArray | GetRequiredInputNames () const |
|
bool | HasInput (const DataObjectIdentifierType &key) const |
|
bool | HasOutput (const DataObjectIdentifierType &key) const |
|
void | IncrementProgress (float increment) |
|
virtual DataObjectPointer | MakeOutput (const DataObjectIdentifierType &) |
|
virtual void | PropagateRequestedRegion (DataObject *output) |
|
virtual void | ResetPipeline () |
|
virtual void | SetAbortGenerateData (bool _arg) |
|
virtual void | Update () |
|
virtual void | UpdateLargestPossibleRegion () |
|
virtual void | UpdateOutputData (DataObject *output) |
|
virtual void | UpdateOutputInformation () |
|
void | UpdateProgress (float progress) |
|
virtual void | SetReleaseDataFlag (bool val) |
|
virtual bool | GetReleaseDataFlag () const |
|
void | ReleaseDataFlagOn () |
|
void | ReleaseDataFlagOff () |
|
virtual void | SetReleaseDataBeforeUpdateFlag (bool _arg) |
|
virtual const bool & | GetReleaseDataBeforeUpdateFlag () const |
|
virtual void | ReleaseDataBeforeUpdateFlagOn () |
|
virtual void | ReleaseDataBeforeUpdateFlagOff () |
|
virtual void | SetNumberOfWorkUnits (ThreadIdType _arg) |
|
virtual const ThreadIdType & | GetNumberOfWorkUnits () const |
|
MultiThreaderType * | GetMultiThreader () const |
|
void | SetMultiThreader (MultiThreaderType *threader) |
|
virtual void | PrepareOutputs () |
|
unsigned long | AddObserver (const EventObject &event, Command *) |
|
unsigned long | AddObserver (const EventObject &event, Command *) const |
|
unsigned long | AddObserver (const EventObject &event, std::function< void(const EventObject &)> function) const |
|
virtual void | DebugOff () const |
|
virtual void | DebugOn () const |
|
Command * | GetCommand (unsigned long tag) |
|
bool | GetDebug () const |
|
MetaDataDictionary & | GetMetaDataDictionary () |
|
const MetaDataDictionary & | GetMetaDataDictionary () const |
|
virtual ModifiedTimeType | GetMTime () const |
|
virtual const TimeStamp & | GetTimeStamp () const |
|
bool | HasObserver (const EventObject &event) const |
|
void | InvokeEvent (const EventObject &) |
|
void | InvokeEvent (const EventObject &) const |
|
virtual void | Modified () const |
|
void | Register () const override |
|
void | RemoveAllObservers () |
|
void | RemoveObserver (unsigned long tag) |
|
void | SetDebug (bool debugFlag) const |
|
void | SetReferenceCount (int) override |
|
void | UnRegister () const noexcept override |
|
void | SetMetaDataDictionary (const MetaDataDictionary &rhs) |
|
void | SetMetaDataDictionary (MetaDataDictionary &&rrhs) |
|
virtual void | SetObjectName (std::string _arg) |
|
virtual const std::string & | GetObjectName () const |
|
Pointer | Clone () const |
|
virtual void | Delete () |
|
virtual int | GetReferenceCount () const |
|
void | Print (std::ostream &os, Indent indent=0) const |
|
|
| AutomaticTopologyMeshSource () |
|
void | GenerateData () override |
|
| ~AutomaticTopologyMeshSource () override=default |
|
| MeshSource () |
|
| ~MeshSource () override=default |
|
void | PrintSelf (std::ostream &os, Indent indent) const override |
|
void | GenerateInputRequestedRegion () override |
|
| ProcessObject () |
|
| ~ProcessObject () override |
|
DataObject * | GetInput (const DataObjectIdentifierType &key) |
|
const DataObject * | GetInput (const DataObjectIdentifierType &key) const |
|
DataObject * | GetInput (DataObjectPointerArraySizeType idx) |
|
const DataObject * | GetInput (DataObjectPointerArraySizeType idx) const |
|
virtual void | SetInput (const DataObjectIdentifierType &key, DataObject *input) |
|
virtual void | SetNthInput (DataObjectPointerArraySizeType idx, DataObject *input) |
|
virtual void | AddInput (DataObject *input) |
|
virtual void | PushBackInput (const DataObject *input) |
|
virtual void | PopBackInput () |
|
virtual void | PushFrontInput (const DataObject *input) |
|
virtual void | PopFrontInput () |
|
virtual void | RemoveInput (const DataObjectIdentifierType &key) |
|
virtual void | RemoveInput (DataObjectPointerArraySizeType) |
|
DataObject * | GetPrimaryInput () |
|
const DataObject * | GetPrimaryInput () const |
|
virtual void | SetPrimaryInputName (const DataObjectIdentifierType &key) |
|
virtual const char * | GetPrimaryInputName () const |
|
virtual void | SetPrimaryInput (DataObject *object) |
|
void | SetNumberOfIndexedInputs (DataObjectPointerArraySizeType num) |
|
virtual void | SetNumberOfRequiredInputs (DataObjectPointerArraySizeType) |
|
virtual const DataObjectPointerArraySizeType & | GetNumberOfRequiredInputs () const |
|
bool | RemoveRequiredInputName (const DataObjectIdentifierType &) |
|
bool | IsRequiredInputName (const DataObjectIdentifierType &) const |
|
void | SetRequiredInputNames (const NameArray &) |
|
bool | AddRequiredInputName (const DataObjectIdentifierType &) |
|
bool | AddRequiredInputName (const DataObjectIdentifierType &, DataObjectPointerArraySizeType idx) |
|
void | AddOptionalInputName (const DataObjectIdentifierType &) |
|
void | AddOptionalInputName (const DataObjectIdentifierType &, DataObjectPointerArraySizeType idx) |
|
DataObject * | GetOutput (const DataObjectIdentifierType &key) |
|
const DataObject * | GetOutput (const DataObjectIdentifierType &key) const |
|
virtual void | SetPrimaryOutputName (const DataObjectIdentifierType &key) |
|
virtual const char * | GetPrimaryOutputName () const |
|
DataObject * | GetOutput (DataObjectPointerArraySizeType i) |
|
const DataObject * | GetOutput (DataObjectPointerArraySizeType i) const |
|
virtual void | SetOutput (const DataObjectIdentifierType &name, DataObject *output) |
|
virtual void | RemoveOutput (const DataObjectIdentifierType &key) |
|
DataObject * | GetPrimaryOutput () |
|
const DataObject * | GetPrimaryOutput () const |
|
virtual void | SetPrimaryOutput (DataObject *object) |
|
virtual void | SetNthOutput (DataObjectPointerArraySizeType idx, DataObject *output) |
|
virtual void | AddOutput (DataObject *output) |
|
virtual void | RemoveOutput (DataObjectPointerArraySizeType idx) |
|
virtual void | SetNumberOfRequiredOutputs (DataObjectPointerArraySizeType _arg) |
|
virtual const DataObjectPointerArraySizeType & | GetNumberOfRequiredOutputs () const |
|
void | SetNumberOfIndexedOutputs (DataObjectPointerArraySizeType num) |
|
DataObjectIdentifierType | MakeNameFromInputIndex (DataObjectPointerArraySizeType idx) const |
|
DataObjectIdentifierType | MakeNameFromOutputIndex (DataObjectPointerArraySizeType idx) const |
|
DataObjectPointerArraySizeType | MakeIndexFromInputName (const DataObjectIdentifierType &name) const |
|
DataObjectPointerArraySizeType | MakeIndexFromOutputName (const DataObjectIdentifierType &name) const |
|
bool | IsIndexedInputName (const DataObjectIdentifierType &) const |
|
bool | IsIndexedOutputName (const DataObjectIdentifierType &) const |
|
virtual void | VerifyPreconditions () ITKv5_CONST |
|
virtual void | VerifyInputInformation () ITKv5_CONST |
|
virtual void | GenerateOutputRequestedRegion (DataObject *output) |
|
virtual void | GenerateOutputInformation () |
|
virtual void | PropagateResetPipeline () |
|
virtual void | ReleaseInputs () |
|
virtual void | CacheInputReleaseDataFlags () |
|
virtual void | RestoreInputReleaseDataFlags () |
|
virtual bool | GetThreaderUpdateProgress () const |
|
virtual void | ThreaderUpdateProgressOn () |
|
virtual void | ThreaderUpdateProgressOff () |
|
virtual void | SetThreaderUpdateProgress (bool arg) |
|
| Object () |
|
| ~Object () override |
|
bool | PrintObservers (std::ostream &os, Indent indent) const |
|
virtual void | SetTimeStamp (const TimeStamp &timeStamp) |
|
virtual LightObject::Pointer | InternalClone () const |
|
| LightObject () |
|
virtual void | PrintHeader (std::ostream &os, Indent indent) const |
|
virtual void | PrintTrailer (std::ostream &os, Indent indent) const |
|
virtual | ~LightObject () |
|
template<typename TOutputMesh>
class itk::AutomaticTopologyMeshSource< TOutputMesh >
Convenience class for generating meshes.
This generates an N-dimensional mesh consisting of some combination of vertices, line segments, triangles, quadrilaterals, tetrahedra, and hexahedra. Identifiers for the cells are automatically added, and topological connectivity is automatically computed. When a cell is added, all of its boundary features are determined and added as well.
The main methods are of the form AddThing, where Thing can be Point, Vertex, Triangle, Quadrilateral, Tetrahedron, or Hexahedron. Each of these methods has several overloaded forms, permitting multiple ways to specify the object being added. When called, each of these methods first checks to see if the object has already been added. If it has not, then a new identifier is generated (the smallest one so far unused), the object is added with that identifier, and the ID is returned. If the object has already been added, then the ID it already has is returned and nothing else is done.
When a cell is added, all of its boundary elements are also added, and boundary assignments are set. A cell can be specified using IDs of points already added, or using Point objects that may or may not already be in the mesh. If a cell is specified using Point objects, then the points are added to the mesh if necessary.
The different ways of specifying a cell are
- An IdentifierArrayType (= itk::Array<IdentifierType>) of point identifiers. These point identifiers are the ones returned by calls to AddPoint().
- A parameter list of point identifiers (for instance,
this->AddLine(0, 1)
, if 0 and 1 are point identifiers).
- A parameter list of itk::Point objects (the function then generates the identifiers).
- A parameter list of C-style arrays, with each such array giving the coordinates of one point. This form is useful for copying in geometry from foreign data structures.
For meshes generated using this filter, only one cell can be added for any given set of vertices. If a, b, c, and d are identifiers for four points in R^3, then (a, b, c, d) and (a, c, d, b) determine two different quadrilaterals (at least one of which is either degenerate or nonplanar). If you call
then only the first quadrilateral will actually be added.
To add the topological information to an already constructed mesh (for efficiency of traversal), use this class to generate a copy of the original mesh.
Example: The following code generates a mesh consisting of two triangles sharing an edge.
MeshSourceType::Pointer meshSource = MeshSourceType::New();
meshSource->AddTriangle(
meshSource->AddPoint(0, 0, 0),
meshSource->AddPoint(1, 0, 0),
meshSource->AddPoint(0, 1, 0) );
meshSource->AddTriangle(
meshSource->AddPoint(0, 0, 0),
meshSource->AddPoint(1, 0, 0),
meshSource->AddPoint(0, 0, 1) );
This class inherits from itk::MeshSource so it fits conveniently into a pipeline, but GetOutput() is always valid after every Add[Something]() call, and Update() is a no-op. It is not thread safe.
- Examples
- Examples/DataRepresentation/Mesh/AutomaticMesh.cxx.
Definition at line 111 of file itkAutomaticTopologyMeshSource.h.
template<typename TOutputMesh >
Add the hexahedron specified by the four points, and return its ID. If the points are p0, p1, p2, and p3, then the following additional cells (represented here as ordered tuples) are created (if they don't already exist) and associated as boundaries, in the order given:
Vertices: (p0), (p1), (p2), (p3), (p4), (p5), (p6), (p7).
Lines: (p0, p1), (p2, p3), (p4, p5), (p6, p7), (p0, p2), (p1, p3), (p4, p6), (p5, p7), (p0, p4), (p1, p5), (p2, p6), (p3, p7).
Quadrilaterals: (0, 1, 2, 3), (4, 5, 6, 7), (0, 1, 4, 5), (2, 3, 6, 7), (0, 2, 4, 6), (1, 3, 5, 7),
In particular, if the points are connected topologically as follows
p4------------p5
| \ / |
| p0------p1 |
| | | |
| | | |
| p2------p3 |
| / \ |
p6------------p7
then you would call, for instance, meshSource->AddQuadrilateral(p0, p1, p2, p3, p4, p5, p6, p7)
.
template<typename TOutputMesh >
Add the tetrahedron specified by the three points, and return its ID. If the points are p0, p1, and p2, then the following additional cells (represented here as ordered tuples) are created (if they don't already exist) and associated as boundaries, in the order given:
Vertices: (p0), (p1), (p2), (p3).
Lines: (p0, p1), (p0, p2), (p0, p3), (p1, p2), (p1, p3), (p2, p3).
Triangles: (p0, p1, p2), (p0, p1, p3), (p0, p2, p3), (p1, p2, * p3).