Skip to content

ENH: Ingest ITKTextureFeatures into Modules/Filtering#6238

Merged
hjmjohnson merged 166 commits intoInsightSoftwareConsortium:mainfrom
hjmjohnson:ingest-TextureFeatures
May 9, 2026
Merged

ENH: Ingest ITKTextureFeatures into Modules/Filtering#6238
hjmjohnson merged 166 commits intoInsightSoftwareConsortium:mainfrom
hjmjohnson:ingest-TextureFeatures

Conversation

@hjmjohnson
Copy link
Copy Markdown
Member

Ingest the standalone remote module
InsightSoftwareConsortium/ITKTextureFeatures
into 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 guidelines
defined 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
Aspect Value
Whitelist Utilities/Maintenance/RemoteModuleIngest/whitelists/TextureFeatures.list
Final tree merge count 31 (incl. ingest merge)
Whitelisted files 63 (include/, test/, wrapping/, CMakeLists.txt, itk-module.cmake, LICENSE)
Content-links at HEAD 50+ .cid stubs (upstream already used ExternalData), 0 .md5, 0 .shaNNN, 0 raw binaries
examples/ and doc/ directories Auto-excluded; remain in archived upstream
License Apache-2.0
git blame Walks back to original upstream contributors (Jean-Baptiste Vimort, Matt McCormick, Francois Budin, Beatriz Paniagua, and others)
Local validation
  • pre-commit run --all-files: clean
  • cmake -DModule_TextureFeatures:BOOL=ON .: configures clean
  • Compile check: new module's test source files all build clean
    (TextureFeaturesHeaderTest1.cxx.o, TextureFeaturesTestDriver.cxx.o,
    RunLengthTextureFeaturesImageFilterInstantiationTest.cxx.o,
    RunLengthTextureFeaturesImageFilterTest.cxx.o).
  • Test execution will fetch the existing .cid blobs through the standard
    ITKTestingData mirror at CI time.
Commits at PR tip (top → bottom)
  1. ENH: Enable Module_TextureFeatures in configure-ci
  2. COMP: Remove TextureFeatures .remote.cmake (in-tree)
  3. DOC: Add TextureFeatures README pointing at upstream
  4. ENH: Ingest ITKTextureFeatures into Modules/Filtering
    (merge commit --no-ff --allow-unrelated-histories to sanitized
    filter-repo'd upstream history; preserves 30 upstream merges and
    git blame to original authors)
  5. ENH: Add v4 whitelist for TextureFeatures ingest
Phase B (post-merge) — upstream archival

After this PR merges, run Phase B from a fresh worktree:

Utilities/Maintenance/RemoteModuleIngest/archive-remote-module.sh \
    TextureFeatures

Phase B publishes the upstream removal commit, promotes
MIGRATION_README.md to README.md so the GitHub landing page
renders the migration notice (per the
ingest-archive-readme rule), and flips archived=true.
No upstream side-effects happen until that step.

Refs: #6060

jbvimort added 30 commits March 21, 2017 14:55
ITK Module Template
…ilter

TODO:
- add multithreading
- add Concept checking for the inpout and output
- utilisation of the mask
- creation of tests
"ScalarImageToRunLengthMatrixFilter"
- Deletion of unused libraries
- Deletion of useless variable (fastComputation)
- Code style correction (variables starting with lower case)
- Orthographic corrections
…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
ScalarImageToTextureFeaturesImageFilter
thewtex and others added 2 commits March 10, 2025 18:21
…twareConsortium/replace-itkstaticc

onstmacro-with-constexpr

replace itkstaticconstmacro with constexpr
@github-actions github-actions Bot added type:Infrastructure Infrastructure/ecosystem related changes, such as CMake or buildbots type:Enhancement Improvement of existing methods or implementation area:Python wrapping Python bindings for a class type:Testing Ensure that the purpose of a class is met/the results on a wide set of test cases are correct area:Filtering Issues affecting the Filtering module area:Remotes Issues affecting the Remote module type:Data Changes to testing data labels May 8, 2026
Comment thread Modules/Filtering/TextureFeatures/CMakeLists.txt Outdated
Comment thread Modules/Filtering/TextureFeatures/itk-module.cmake Outdated
Comment thread Modules/Filtering/TextureFeatures/LICENSE Outdated
hjmjohnson and others added 6 commits May 8, 2026 13:14
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.
@hjmjohnson hjmjohnson force-pushed the ingest-TextureFeatures branch from 4f985b8 to 8353852 Compare May 8, 2026 18:17
@hjmjohnson hjmjohnson marked this pull request as ready for review May 8, 2026 18:19
@greptile-apps

This comment was marked as resolved.

Comment thread Modules/Filtering/TextureFeatures/test/CMakeLists.txt Outdated
Comment thread Modules/Filtering/TextureFeatures/include/itkFirstOrderTextureHistogram.h Outdated
Comment thread Modules/Filtering/TextureFeatures/include/itkFirstOrderTextureHistogram.h Outdated
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.
Copy link
Copy Markdown
Member

@dzenanz dzenanz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Greptile has some good feedback too. Thanks for addressing mine.

hjmjohnson added 2 commits May 9, 2026 08:21
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.
@hjmjohnson hjmjohnson force-pushed the ingest-TextureFeatures branch from 0af32ec to 9a16d90 Compare May 9, 2026 13:22
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.
@hjmjohnson hjmjohnson merged commit b6eb189 into InsightSoftwareConsortium:main May 9, 2026
19 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:Filtering Issues affecting the Filtering module area:Python wrapping Python bindings for a class area:Remotes Issues affecting the Remote module type:Data Changes to testing data type:Enhancement Improvement of existing methods or implementation type:Infrastructure Infrastructure/ecosystem related changes, such as CMake or buildbots type:Testing Ensure that the purpose of a class is met/the results on a wide set of test cases are correct

Projects

None yet

Development

Successfully merging this pull request may close these issues.