ITK Release 4/QuadEdgeMesh Filter/DataProcessing: Difference between revisions

From KitwarePublic
Jump to navigationJump to search
(Created page with "= Quad Edge Mesh Filter Data Processing = Depending on the kind of filters, and on data (type, application), data may be processed differently. == Examples == Here, I will ta...")
 
 
Line 1: Line 1:
= Quad Edge Mesh Filter Data Processing =
Depending on the kind of filters, and on data (type, application), data may be processed differently.


Depending on the kind of filters, and on data (type, application), data may be processed differently.
= Examples =


== Examples ==
Here, I will take several simple examples to illustrate the problem:


Here, I will take several simple examples to illustrate the problem:
== LinearParameterizationfilter ==
 
Most of the time, data are copied from the input to the output.


=== QuadEdgeMeshSmoothingFilter ===
== QuadEdgeMeshSmoothingFilter ==


This filter processes the geometry, i.e. the location of points can be affected by this filter.
This filter processes the geometry, i.e. the location of points can be affected by this filter.
Some data related to the geometry, e.g. the area, normals, can also be affected.
Some data related to the geometry, e.g. the area, normals, can also be affected.


=== DelaunayConformingFilter ===
== DelaunayConformingFilter ==


Edge are flipped during this process. Though the number of triangles would remain the same, out triangles are totally different from input ones.
Edge are flipped during this process. Though the number of triangles would remain the same, out triangles are totally different from input ones.
Line 18: Line 20:
When flipping edges, local neighborhood change and thus data related, e.g. area can also be affected.
When flipping edges, local neighborhood change and thus data related, e.g. area can also be affected.


=== Decimation Filter ===
== Decimation Filter ==


Edge are contracted during this process. Local geometry, connectivity are modified.
Edge are contracted during this process. Local geometry, connectivity are modified.
So data attached to one particular triangle, or to one particular vertex can be affected too.
So data attached to one particular triangle, or to one particular vertex can be affected too.


== Proposals ==
= Proposals =


Here are listed bunch of solutions to be discussed:
Here are listed bunch of solutions (feel free to add your solution) to be discussed:


=== Copy Data from Input to Output ===
== Copy Data from Input to Output ==


In this case, geometry and connectivity are processed in one filter, data are copied from the input to the output (even though the number of points/cells could be different). Then, follows another filter that will process the data.
In this case, geometry and connectivity are processed in one filter, data are copied from the input to the output (even though the number of points/cells could be different). Then, follows another filter that will process the data.


=== Provide Data Processing filter to QuadEdgeMeshFilter ===
== Provide Data Processing filter to QuadEdgeMeshFilter ==


In this case, we could  
In this case, we could  
* create a virtual method to process data to be re-implemented in inherited classes for all kind of types and applications.
* create a virtual method to process data to be re-implemented in inherited classes for all kind of types and applications.
* add another template argument to tell filters what to do with data (choose at compilation time)
* add another template argument to tell filters what to do with data (choose at compilation time)
* provide a functor / class to process data (choose at run-time)
* provide a functor / class to process data (choose at run-time)

Latest revision as of 14:05, 28 September 2010

Depending on the kind of filters, and on data (type, application), data may be processed differently.

Examples

Here, I will take several simple examples to illustrate the problem:

LinearParameterizationfilter

Most of the time, data are copied from the input to the output.

QuadEdgeMeshSmoothingFilter

This filter processes the geometry, i.e. the location of points can be affected by this filter. Some data related to the geometry, e.g. the area, normals, can also be affected.

DelaunayConformingFilter

Edge are flipped during this process. Though the number of triangles would remain the same, out triangles are totally different from input ones. So if data are attached to one particular triangle in input should it be attributed to the triangle with the same id which is non necessarily related to this one? When flipping edges, local neighborhood change and thus data related, e.g. area can also be affected.

Decimation Filter

Edge are contracted during this process. Local geometry, connectivity are modified. So data attached to one particular triangle, or to one particular vertex can be affected too.

Proposals

Here are listed bunch of solutions (feel free to add your solution) to be discussed:

Copy Data from Input to Output

In this case, geometry and connectivity are processed in one filter, data are copied from the input to the output (even though the number of points/cells could be different). Then, follows another filter that will process the data.

Provide Data Processing filter to QuadEdgeMeshFilter

In this case, we could

  • create a virtual method to process data to be re-implemented in inherited classes for all kind of types and applications.
  • add another template argument to tell filters what to do with data (choose at compilation time)
  • provide a functor / class to process data (choose at run-time)