Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
60c166f
ENH: Add v4 remote-module ingestion (two-phase, per-commit hooks)
hjmjohnson May 4, 2026
3fc59b6
COMP: Add scaffolding deny-pass to v4 ingest driver
hjmjohnson May 4, 2026
64fcc29
COMP: Tighten v4 ingest to satisfy ITK ghostflow checks
hjmjohnson May 4, 2026
10d0f68
COMP: v4 sanitize patches itk-module README.rst->README.md references
hjmjohnson May 4, 2026
f084407
DOC: v4 strategy — record ghostflow root-commit + Greptile review pat…
hjmjohnson May 5, 2026
4e53c93
COMP: v4 deny-pass — strip ExternalData fetch cache from history
hjmjohnson May 5, 2026
3eae792
COMP: v4 sanitize — unwrap standalone-build CMake guard
hjmjohnson May 5, 2026
aabaafe
DOC: v4 strategy — split auto-sanitized vs. operator-fix patterns
hjmjohnson May 5, 2026
7b667bc
ENH: Add v4 PolarTransform whitelist (header-only, mirrors Cuberille)
hjmjohnson May 5, 2026
1a95d59
ENH: Add v4 SplitComponents whitelist (header-only, mirrors Cuberille)
hjmjohnson May 5, 2026
4ececac
ENH: Add v4 IOMeshMZ3 whitelist (mirrors IOMeshSTL — has include + src)
hjmjohnson May 5, 2026
d124a99
ENH: Add v4 IOFDF whitelist (mirrors IOMeshSTL — has include + src)
hjmjohnson May 5, 2026
b44a7a9
COMP: v4 sanitize — strip cmake_minimum_required from module CMakeLists
hjmjohnson May 5, 2026
598b64b
DOC: v4 strategy — add cmake_minimum_required-stripper to auto-saniti…
hjmjohnson May 5, 2026
f15b899
COMP: Strip dynamic file(READ README.md DESCRIPTION) from itk-module.…
hjmjohnson May 6, 2026
56d90f4
ENH: Add v4 whitelist for SubdivisionQuadEdgeMeshFilter ingest
hjmjohnson May 7, 2026
03b247a
ENH: Initial commit
arnaudgelas Oct 8, 2014
f4ead9b
ENH: import code from gerrit
arnaudgelas Dec 8, 2014
6225728
BUG: fix doxygen test
arnaudgelas Dec 8, 2014
bc5f376
ENH: Follow Remote module naming conventions.
thewtex Dec 8, 2014
668afab
BUG: Fix the test driver name.
thewtex Dec 9, 2014
ab0917b
BUG: Fix warnings on ITK dashboard
arnaudgelas Dec 12, 2014
bdc2dd0
BUG: fix KWStyle errors
arnaudgelas Mar 13, 2015
4a28329
COMP: missing include for concept checking
arnaudgelas May 18, 2015
a84e7d2
ENH: ITK_OVERRIDE
sudomakeinstall Sep 30, 2015
b361288
STYLE: Use Macro for Function Deletion
zachary-williamson Jun 30, 2016
c3e9a38
ENH: ITKv5 override consistency
hjmjohnson Dec 17, 2017
b211a18
COMP: Use C++11 override directly
hjmjohnson Dec 17, 2017
c13cb12
STYLE: Modernize to C++11 conventions
hjmjohnson Feb 12, 2018
5295d1b
STYLE: Prefer C++11 type alias over typedef
hjmjohnson Feb 13, 2018
85d239a
STYLE: Prefer constexpr for const numeric literals
hjmjohnson Feb 13, 2018
5abdee3
COMP: Move ITK_DISALLOW_COPY_AND_ASSIGN calls to public section.
Apr 14, 2018
ee7fad1
COMP: Prefer C++11 math over vcl_*
hjmjohnson Nov 1, 2018
54591ac
COMP: Future proof vnl_math_XXX function usage.
hjmjohnson Nov 3, 2018
80c821b
ENH: Enable building module outside ITK.
jhlegarreta Nov 12, 2018
0909dc5
STYLE: Conform to ITK remote module naming guidelines.
jhlegarreta Nov 12, 2018
f11cde5
ENH: Add CI.
jhlegarreta Nov 10, 2018
03e3d89
ENH: Add .gitattributes to allow running ITK clang-formatting scripts
hjmjohnson Feb 20, 2020
21e89d9
STYLE: Prefer = default to explicitly trivial implementations
hjmjohnson Feb 17, 2020
5bfc2d1
DOC: Update copyright assignment to NumFOCUS
hjmjohnson Feb 19, 2020
d002569
ENH: Update enums from changes in ITK
mseng10 Feb 20, 2020
397c5f2
COMP: Improve template formatting.
hjmjohnson Mar 1, 2020
ce86844
BUG: Fix Wrapping Errors
sudomakeinstall May 10, 2020
3cfc0a0
BUG: Disable Delaunay in Test Suite
sudomakeinstall May 10, 2020
cd9251a
ENH: Improve Test Coverage
sudomakeinstall May 26, 2020
8c66e90
BUG: Pass CellData In Triangle Cell Subdivision
sudomakeinstall Dec 22, 2019
8c51754
ENH: Improve Testing
sudomakeinstall May 28, 2020
c29136c
COMP: Address Wunused-local-typedefs and Waddress
sudomakeinstall Jun 19, 2020
c2c3606
STYLE: Rename ITK_DISALLOW_COPY_AND_ASSIGN to ITK_DISALLOW_COPY_AND_MOVE
mseng10 Oct 16, 2020
0f8bb06
COMP: Remove inclusion of .hxx files as headers
hjmjohnson Dec 17, 2021
6bedfe5
ENH: Bump ITK and change http to https
tbirdso May 31, 2022
b95fca1
COMP: Use modern macro for name of class
hjmjohnson Jan 25, 2025
dd7210b
STYLE: CoordRepType -> CoordinateType code readability
hjmjohnson Jan 26, 2025
8daffd1
ENH: Convert from md5 to .cid tags.
hjmjohnson Apr 22, 2026
84a9765
DOC: Add SubdivisionQuadEdgeMeshFilter README pointing at upstream
hjmjohnson May 7, 2026
ea96923
COMP: Remove SubdivisionQuadEdgeMeshFilter .remote.cmake (in-tree)
hjmjohnson May 7, 2026
58da70a
ENH: Enable Module_SubdivisionQuadEdgeMeshFilter in configure-ci
hjmjohnson May 7, 2026
a4b02e5
BUG: Insert point IDs (not cell IDs) into Loop adaptive smoothing set
hjmjohnson May 7, 2026
6eb80b9
BUG: Advance cell iterator before continue in subdivision skip-paths
hjmjohnson May 7, 2026
6456550
STYLE: Remove dead inline-smoothing block superseded by SmoothingPoin…
hjmjohnson May 7, 2026
2444fc8
ENH: Regression test for the three SubdivisionQuadEdgeMeshFilter bugs
hjmjohnson May 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
project(SubdivisionQuadEdgeMeshFilter)

itk_module_impl()
201 changes: 201 additions & 0 deletions Modules/Filtering/SubdivisionQuadEdgeMeshFilter/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
https://www.apache.org/licenses/

TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

1. Definitions.

"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.

"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.

"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.

"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.

"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.

"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.

"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).

"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.

"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."

"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.

2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.

3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.

4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:

(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and

(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and

(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and

(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.

You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.

5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.

6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.

7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.

8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.

9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright {yyyy} {name of copyright owner}

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
29 changes: 29 additions & 0 deletions Modules/Filtering/SubdivisionQuadEdgeMeshFilter/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# SubdivisionQuadEdgeMeshFilter

In-tree ITK module providing triangle- and edge-based subdivision
filters for `itk::QuadEdgeMesh`. The filters refine a coarse triangular
quad-edge mesh into a finer one using classical subdivision schemes
(Loop, Modified Butterfly, Square Three, Linear), with both cell-based
and edge-based variants and a conditional/criterion-driven dispatcher
for adaptive refinement.

The flagship classes are
`itk::SubdivisionQuadEdgeMeshFilter`,
`itk::TriangleCellSubdivisionQuadEdgeMeshFilter`,
`itk::TriangleEdgeCellSubdivisionQuadEdgeMeshFilter`,
`itk::ConditionalSubdivisionQuadEdgeMeshFilter`, and the concrete
`Loop`, `LinearTriangle`, `ModifiedButterfly`, and `SquareThree`
specializations.

## Origin

Ingested from the standalone remote module
[**InsightSoftwareConsortium/itkSubdivisionQuadEdgeMeshFilter**](https://github.com/InsightSoftwareConsortium/itkSubdivisionQuadEdgeMeshFilter)
on 2026-05-07 via the v4 ingestion pipeline. The upstream repository
will be archived read-only after this PR merges; it remains reachable
at the URL above for historical reference.

## References

- Zhu W. *Triangle Mesh Subdivision.* The Insight Journal. 2010.
<https://doi.org/10.54294/vw0ke0>
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
/*=========================================================================
*
* Copyright NumFOCUS
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0.txt
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*=========================================================================*/

#ifndef itkCellAreaTriangleCellSubdivisionCriterion_h
#define itkCellAreaTriangleCellSubdivisionCriterion_h

#include "itkQuadEdgeMeshSubdivisionCriterion.h"
#include "itkObjectFactory.h"
#include "itkTriangleHelper.h"
#include "itkNumericTraits.h"


namespace itk
{
/**
*\class CellAreaTriangleCellSubdivisionCriterion
*\brief
*\ingroup SubdivisionQuadEdgeMeshFilter
*/
template <typename TSubdivisionFilter>
class CellAreaTriangleCellSubdivisionCriterion : public QuadEdgeMeshSubdivisionCriterion<TSubdivisionFilter>
{
public:
using Self = CellAreaTriangleCellSubdivisionCriterion;
using Superclass = QuadEdgeMeshSubdivisionCriterion<TSubdivisionFilter>;
using Pointer = SmartPointer<Self>;
using ConstPointer = SmartPointer<const Self>;

using MeshType = typename Superclass::MeshType;
using MeshPointer = typename Superclass::MeshPointer;
using MeshConstPointer = typename Superclass::MeshConstPointer;
using PointsContainerPointer = typename Superclass::PointsContainerPointer;
using PointsContainerConstIterator = typename Superclass::PointsContainerConstIterator;
using PointsContainerIterator = typename Superclass::PointsContainerIterator;
using CellsContainer = typename Superclass::CellsContainer;
using CellsContainerPointer = typename Superclass::CellsContainerPointer;
using CellsContainerIterator = typename Superclass::CellsContainerIterator;
using CellsContainerConstIterator = typename Superclass::CellsContainerConstIterator;
using PointType = typename Superclass::PointType;
using CoordinateType = typename Superclass::CoordinateType;
using PointIdentifier = typename Superclass::PointIdentifier;
using CellIdentifier = typename Superclass::CellIdentifier;
using CellType = typename Superclass::CellType;
using QEType = typename Superclass::QEType;
using PointIdIterator = typename Superclass::PointIdIterator;
using SubdivisionCellContainer = typename Superclass::SubdivisionCellContainer;

/** Run-time type information (and related methods). */
itkOverrideGetNameOfClassMacro(CellAreaTriangleCellSubdivisionCriterion);
itkNewMacro(Self);

void
Compute(MeshType * mesh, SubdivisionCellContainer & cellIds) override;

itkGetConstMacro(MaximumArea, CoordinateType);
itkSetMacro(MaximumArea, CoordinateType);

protected:
CellAreaTriangleCellSubdivisionCriterion() { m_MaximumArea = NumericTraits<CoordinateType>::max(); }
~CellAreaTriangleCellSubdivisionCriterion() override = default;

private:
CoordinateType m_MaximumArea;
};

} // namespace itk
#ifndef ITK_MANUAL_INSTANTIATION
# include "itkCellAreaTriangleCellSubdivisionCriterion.hxx"
#endif

#endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
/*=========================================================================
*
* Copyright NumFOCUS
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0.txt
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*=========================================================================*/

#ifndef itkCellAreaTriangleCellSubdivisionCriterion_hxx
#define itkCellAreaTriangleCellSubdivisionCriterion_hxx


namespace itk
{
template <typename TTriangleCellSubdivisionFilter>
void
CellAreaTriangleCellSubdivisionCriterion<TTriangleCellSubdivisionFilter>::Compute(MeshType * mesh,
SubdivisionCellContainer & cellIds)
{
cellIds.clear();
const CellsContainer * cells = mesh->GetCells();
if (!cells)
{
itkExceptionMacro("<<Input mesh has not cells");
}

CellsContainerConstIterator cter = cells->Begin();
while (cter != cells->End())
{
CellType * cell = cter->Value();
if (!cell || cell->GetType() != CellGeometryEnum::POLYGON_CELL || cell->GetNumberOfPoints() != 3)
{
continue;
}

PointType pointArray[3];
PointIdIterator pter = cell->PointIdsBegin();
PointIdentifier nn = 0;

while (pter != cell->PointIdsEnd())
{
mesh->GetPoint(*pter, &pointArray[nn]);
++pter;
++nn;
}

CoordinateType area = TriangleHelper<PointType>::ComputeArea(pointArray[0], pointArray[1], pointArray[2]);
if (area > m_MaximumArea)
{
cellIds.push_back(static_cast<typename SubdivisionCellContainer::value_type>(cter->Index()));
}

++cter;
}
}

} // namespace itk
#endif
Loading
Loading