ENH: Ingest ITKTextureFeatures into Modules/Filtering#6238
Merged
hjmjohnson merged 166 commits intoInsightSoftwareConsortium:mainfrom May 9, 2026
Merged
ENH: Ingest ITKTextureFeatures into Modules/Filtering#6238hjmjohnson merged 166 commits intoInsightSoftwareConsortium:mainfrom
hjmjohnson merged 166 commits intoInsightSoftwareConsortium:mainfrom
Conversation
ITK Module Template
…ilter TODO: - add multithreading - add Concept checking for the inpout and output - utilisation of the mask - creation of tests
…ariable to each thread
"ScalarImageToRunLengthMatrixFilter"
- Deletion of unused libraries - Deletion of useless variable (fastComputation) - Code style correction (variables starting with lower case) - Orthographic corrections
improve the computation time
…in order to improve the computation time
…in order to have a faster computation
…n of the ITK::Image of ITK::Vector already suported)
itkScalarImageToRunLengthFeaturesImageFilter Creation of an UpdateOutputInformation function
This class only contains accessor to the different variables for now It doesn't compute anything: the computing functions need to be created
…m need to be internally normalized
ScalarImageToTextureFeaturesImageFilter
…twareConsortium/replace-itkstaticc onstmacro-with-constexpr replace itkstaticconstmacro with constexpr
dzenanz
reviewed
May 8, 2026
Brings TextureFeatures from a configure-time remote fetch into the ITK source tree at Modules/Filtering/TextureFeatures/ using the v4 ingestion pipeline (whitelist filter-repo + per-commit clang-format + black + commit-prefix sanitization). Upstream repo: https://github.com/InsightSoftwareConsortium/ITKTextureFeatures.git Upstream tip: 06571a93cfed79930cba30920e5fa0c665b05049 Ingest date: 2026-05-08 Whitelist: TextureFeatures.list Per-commit transforms applied across all 158 commits: - filter-repo --paths-from-file (whitelist) - filter-repo --to-subdirectory-filter Modules/Filtering/TextureFeatures - clang-format -style=file (ITK main's .clang-format) for *.cxx/.h/.hxx/... - black for *.py - heuristic ITK prefix added to commit subjects without one Merge topology preserved: 77 -> 30 merge(s). Primary author: Jean-Baptiste VIMORT <jb.vimort@kitware.com> Co-authored-by: Bradley Lowekamp <blowekamp@mail.nih.gov> Co-authored-by: Dženan Zukić <dzenan.zukic@kitware.com> Co-authored-by: Francois Budin <francois.budin@gmail.com> Co-authored-by: Francois Budin <francois.budin@kitware.com> Co-authored-by: Hans J. Johnson <hans-johnson@uiowa.edu> Co-authored-by: Hans Johnson <hans-johnson@uiowa.edu> Co-authored-by: Hans Johnson <hans.j.johnson@gmail.com> Co-authored-by: Jean-Baptiste VIMORT <jb.vimort@gmail.com> Co-authored-by: Jon Haitz Legarreta <jhlegarreta@vicomtech.org> Co-authored-by: Jon Haitz Legarreta Gorroño <jhlegarreta@vicomtech.org> Co-authored-by: Jon Haitz Legarreta Gorroño <jon.haitz.legarreta@gmail.com> Co-authored-by: maekclena <maggot_fff@hotmail.fr> Co-authored-by: Mathew Seng <mathewseng@gmail.com> Co-authored-by: Matt McCormick <matt.mccormick@kitware.com> Co-authored-by: Matt McCormick <matt@mmmccormick.com> Co-authored-by: Pranjal Sahu <pranjalsahu5@gmail.com> Co-authored-by: Tom Birdsong <tom.birdsong@kitware.com>
CMakeLists.txt: drop the standalone-build branch (if(NOT ITK_SOURCE_DIR) ... else()); only the ITK-embedded path is load-bearing in-tree. itk-module.cmake: replace the boilerplate-comments block with a DOCUMENTATION variable describing the module's purpose, and pass that variable through to DESCRIPTION. LICENSE: remove the per-module copy; ITK's root LICENSE applies.
4f985b8 to
8353852
Compare
This comment was marked as resolved.
This comment was marked as resolved.
hjmjohnson
added a commit
to hjmjohnson/ITK
that referenced
this pull request
May 8, 2026
Adds five fixups that reviewers have flagged on every recent ingest (PRs InsightSoftwareConsortium#6238 TextureFeatures, InsightSoftwareConsortium#6240 PrincipalComponentsAnalysis): * itk_module_examples() — examples/ is not ingested * cmake_policy(CMP...) — ITK top-level pins all policies * cmake_dependent_option(Module_${X}_BUILD_DOCUMENTATION ...) and the matching if(...) add_subdirectory(doc) endif() block * per-module LICENSE / COPYING — ITK's root LICENSE applies in-tree * ${DOCUMENTATION} kept as-is when sourced from a literal set(DOCUMENTATION ...) block; only the file(READ README.md ...) form is replaced by a static one-liner.
dzenanz
reviewed
May 8, 2026
Member
dzenanz
left a comment
There was a problem hiding this comment.
Greptile has some good feedback too. Thanks for addressing mine.
50 tasks
dzenanz
approved these changes
May 9, 2026
itkFirstOrderTextureHistogram.h: guard the unbiased-variance estimate on count > 1 so a single-pixel window no longer divides by zero and produces NaN skewness; correct the stale \ingroup tag. itkFirstOrderTextureFeaturesImageFilter.h: correct the stale \ingroup tag from ITKTextureFeatures (old remote-module name) to TextureFeatures. itkCoocurrenceTextureFeaturesImageFilter.h: drop the unrelated itkScalarImageToRunLengthMatrixFilter.h include — neither the .h nor .hxx uses any type from it. itkCoocurrenceTextureFeaturesImageFilter.hxx: write a zero output pixel on the totalNumberOfFreq == 0 branch so the output never contains uninitialized memory; replace raw new[]/delete[] of the marginal-sums buffer with std::vector for exception safety and zero-initialization. test/CMakeLists.txt: drop the dead first set(TextureFeaturesTests …) block — it listed nonexistent ScalarImageTo* sources and was immediately overwritten by the second definition.
Replace the set(DOCUMENTATION "...") + DESCRIPTION "${DOCUMENTATION}"
indirection with a static one-liner literal.
itk_module() is a CMake macro, so ${ARGN} re-tokenizes its arguments
and list-splits any embedded ";". A future edit adding a semicolon or
"[" to the DOCUMENTATION string would silently produce spurious
"Unknown argument" AUTHOR_WARNINGs from CMake/ITKModuleMacros.cmake:111
on every configure (see PRs InsightSoftwareConsortium#6220, InsightSoftwareConsortium#6245).
The v4 ingestion pipeline (PR InsightSoftwareConsortium#6204) enforces this via
sanitize-history.py:patch_dynamic_description.
0af32ec to
9a16d90
Compare
hjmjohnson
added a commit
to hjmjohnson/ITK
that referenced
this pull request
May 9, 2026
Two ghostflow-check-main violations slipped through v4 sanitization on TextureFeatures ingest (PR InsightSoftwareConsortium#6238): 1. .sha512 / .cid content-link sidecars without trailing newline. is_skip_content() returned True for any single-line hex hash blob, bypassing apply_universal_text_fixers (and therefore fix_end_of_file). Hash content has zero risk from the universal fixers (rstrip + single '\n' append), so drop the hex-hash skip branch and let those blobs flow through the normal text-fixer path. 2. Editor backup files (*~) survived ingestion. Adds **/*~ to the filter-repo --invert-paths deny-pass alongside *.orig / *.rej / *.BACKUP.* / *.LOCAL.* / *.REMOTE.* / *.BASE.*. Documented both in INGESTION_STRATEGY_v4.md's sanitizer table.
b6eb189
into
InsightSoftwareConsortium:main
19 of 20 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ingest the standalone remote module
InsightSoftwareConsortium/ITKTextureFeaturesinto
Modules/Filtering/TextureFeatures/. N-dimensional first-order,run-length, and co-occurrence (GLCM) texture-feature image filters
are now in-tree under
EXCLUDE_FROM_DEFAULT.Built directly on
upstream/main; the v4 ingestion guidelinesdefined in #6204 (sanitize-history pass, deny-pattern pass,
whitelist-only paths, ghostflow-clean per-commit subjects) were
applied locally to produce this PR's content. Closes the
consolidation work of issue #6060 for this module.
Ingest results
Utilities/Maintenance/RemoteModuleIngest/whitelists/TextureFeatures.listinclude/,test/,wrapping/,CMakeLists.txt,itk-module.cmake,LICENSE).cidstubs (upstream already used ExternalData), 0.md5, 0.shaNNN, 0 raw binariesexamples/anddoc/directoriesgit blameLocal validation
pre-commit run --all-files: cleancmake -DModule_TextureFeatures:BOOL=ON .: configures clean(
TextureFeaturesHeaderTest1.cxx.o,TextureFeaturesTestDriver.cxx.o,RunLengthTextureFeaturesImageFilterInstantiationTest.cxx.o,RunLengthTextureFeaturesImageFilterTest.cxx.o)..cidblobs through the standardITKTestingDatamirror at CI time.Commits at PR tip (top → bottom)
ENH:Enable Module_TextureFeatures in configure-ciCOMP:Remove TextureFeatures .remote.cmake (in-tree)DOC:Add TextureFeatures README pointing at upstreamENH:Ingest ITKTextureFeatures into Modules/Filtering(merge commit
--no-ff --allow-unrelated-historiesto sanitizedfilter-repo'd upstream history; preserves 30 upstream merges and
git blameto original authors)ENH:Add v4 whitelist for TextureFeatures ingestPhase B (post-merge) — upstream archival
After this PR merges, run Phase B from a fresh worktree:
Utilities/Maintenance/RemoteModuleIngest/archive-remote-module.sh \ TextureFeaturesPhase B publishes the upstream removal commit, promotes
MIGRATION_README.mdtoREADME.mdso the GitHub landing pagerenders the migration notice (per the
ingest-archive-readmerule), and flipsarchived=true.No upstream side-effects happen until that step.
Refs: #6060