Skip to content

Add Visual Studio specific debug helpers to ITKCommon project - #6699

Open
dzenanz wants to merge 2 commits into
InsightSoftwareConsortium:mainfrom
dzenanz:natvis
Open

Add Visual Studio specific debug helpers to ITKCommon project#6699
dzenanz wants to merge 2 commits into
InsightSoftwareConsortium:mainfrom
dzenanz:natvis

Conversation

@dzenanz

@dzenanz dzenanz commented Jul 24, 2026

Copy link
Copy Markdown
Member

Copying these files to the installation directory will not be required any more.

PR Checklist

@github-actions github-actions Bot added type:Infrastructure Infrastructure/ecosystem related changes, such as CMake or buildbots area:Core Issues affecting the Core module labels Jul 24, 2026
@hjmjohnson

Copy link
Copy Markdown
Member

Reviewed this on two axes (repo standards + does it do what the description claims). The standards side is minor, but the spec side has one blocker: a project-embedded .natstepfilter is not loaded by Visual Studio, so "copying these files will not be required any more" holds for ITK.natvis but not for the new ITK.natstepfilter.

Two things worth fixing regardless of what you decide about the step filter:

  • xmlns="https://schemas.microsoft.com/vstudio/debugger/natstepfilter/2010" should be http://. XML namespaces are compared as opaque strings, so https silently fails to match and VS ignores the file. Note this was already fixed once — 7f3f616 (N. Dekker, 2023) deliberately reverted this exact http:https: change.
  • itk::SmartPointer.+ should be .* to match the sibling default.natstepfilter; .+ requires a trailing character, so a bare itk::SmartPointer frame isn't filtered.
Spec: does the change deliver what the description claims?
  1. .natstepfilter has no project-item support. VS auto-loads .natvis from a project's item list (and can embed it in the PDB), but step filters are read only from %VSInstallDir%\Common7\Packages\Debugger\Visualizers\ and %USERPROFILE%\Documents\Visual Studio 20xx\Visualizers\. Adding it to ITKCommon_SRCS makes it appear in Solution Explorer and nothing more — the manual copy remains mandatory for the step filter.

  2. Visual Studio generator only. The .natvis-in-project mechanism is an MSBuild/VS feature. MSVC is also true under Ninja, where the file is just a non-compiled source and is ignored. Worth stating the limitation somewhere, since Ninja+MSVC is a common ITK configuration.

  3. Nothing added to the INSTALL/export path. Utilities/Debugger/ isn't installed or exported, so consumers of an installed ITK get neither file. For a PR about not needing to copy files, that's the case that still requires copying.

  4. Stale instructions left in place. Utilities/Debugger/ITK.natvis line 3 still says "e.g. copy into ...\Visualizers\ITK.natvis" and default.natstepfilter line 2 says "Copy into ...\default.natstepfilter". If copying is no longer required, those comments now contradict the shipped behaviour.

  5. The new file duplicates existing rules. Both rules in ITK.natstepfilter are a strict subset of default.natstepfilter, which already carries itk::SmartPointer.* and itk::Object::Register — a second place to maintain the same two patterns.

Standards: repo conventions
  1. elseif(MSVC) placement. That if/elseif chain (if(CMAKE_CXX_COMPILER MATCHES "^icc") ... elseif(CMAKE_COMPILER_IS_GNUCXX) ... elseif(MSVC)) exists solely to set floating-point flags on itkCompensatedSummation.cxx. Because it's elseif, an Intel-compiler-on-Windows build takes the first branch and never reaches the MSVC arm — those users silently get no visualizers. A separate if(MSVC) block would decouple the two concerns.

  2. Path computation. ${CMAKE_CURRENT_LIST_DIR}/../../../../Utilities/Debugger hard-codes the module's depth in the tree. ${ITK_SOURCE_DIR}/Utilities/Debugger is the established idiom here (see Modules/Core/GPUCommon/CMakeLists.txt:4) and drops the get_filename_component call entirely.

  3. Variable naming. ITK_Debugger_DIR reads like a public cache variable; local helpers in this same file use a leading underscore (e.g. _itk_python_target).

  4. The two list(APPEND ITKCommon_SRCS ...) calls could be a single call with both files.

The explanatory comments on the two list(APPEND) lines are worth keeping — attaching XML resources to a source list is not an obvious paradigm to developers who don't work in Visual Studio.

@dzenanz
dzenanz force-pushed the natvis branch 2 times, most recently from 6d710a5 to 35ef325 Compare July 27, 2026 20:30
@dzenanz

dzenanz commented Jul 27, 2026

Copy link
Copy Markdown
Member Author

This doesn't seem to work. It needs to be added to end-user executable. Maybe what we can do here is put these files in a more visible location so they are easy to reference from a project using ITK. We could also add them to tests, so we get this nicety when debugging tests.

@dzenanz
dzenanz force-pushed the natvis branch 2 times, most recently from 8da6c3b to 8592d9f Compare July 27, 2026 22:46
@dzenanz

dzenanz commented Jul 27, 2026

Copy link
Copy Markdown
Member Author

Propagation of both files via interface sources works. However, ITK.natjmc is ignored. Stepping into goes into SmartPointer operator->().

@dzenanz
dzenanz marked this pull request as ready for review July 28, 2026 18:26
@dzenanz

dzenanz commented Jul 28, 2026

Copy link
Copy Markdown
Member Author

Using .natstepfilter instead of .natjmc works, at least in VS2026. Judging by documentation, it should work in newer version of VS2022. I will test this today/tomorrow. Meanwhile, it would be good if someone reviewed this PR.

@dzenanz
dzenanz requested a review from N-Dekker July 28, 2026 18:31
Comment thread Modules/Core/Common/src/CMakeLists.txt Outdated
@greptile-apps

greptile-apps Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR integrates Visual Studio debugger helpers into ITKCommon.

  • Adds generator-specific propagation of Natvis metadata for build-tree and installed consumers.
  • Installs the Natvis and native step-filter files with the Development component.
  • Expands debugger visualizations for additional ITK value, pixel, vector, array, and matrix types.
  • Replaces the generic default step filter with an ITK-specific filter.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains; the previously unanchored installed Ninja Natvis path now uses the installation prefix.

T-Rex T-Rex Logs

What T-Rex did

  • Identified an environment blocker related to CMake/MSVC tool availability from the tool discovery log.
  • Ran the pre-change validation harness and confirmed that pre-change assertions passed with exit code 0.
  • Ran the post-change validation harness and confirmed that the focused integration assertions passed with exit code 0.
  • Executed the validation harness script msvc-debugger-integration-check.py to compare the two captures used for the verification.

View all artifacts

T-Rex Ran code and verified through T-Rex

Important Files Changed

Filename Overview
Modules/Core/Common/src/CMakeLists.txt Adds MSVC debugger metadata to ITKCommon and now anchors the installed Ninja Natvis path with the installation prefix.
Utilities/Debugger/ITK.natvis Generalizes FixedArray visualization and adds visualizers for several related ITK data types.
Utilities/Debugger/ITK.natstepfilter Adds an ITK-focused native debugger step filter.
Utilities/Debugger/default.natstepfilter Removes the former machine-wide generic step-filter definition.

Reviews (3): Last reviewed commit: "ENH: Expand Visual Studio debug visualiz..." | Re-trigger Greptile

Starting in Visual Studio 2022 version 17.6, copying these files
to VS installation directory will no longer be required.
Natvis has been supported for longer, including all
currently supported Visual Studio versions.
@dzenanz

dzenanz commented Jul 28, 2026

Copy link
Copy Markdown
Member Author

@greptileai re-review.

@dzenanz

dzenanz commented Jul 28, 2026

Copy link
Copy Markdown
Member Author

This works with latest VS2022, both from build and install directories.

@hjmjohnson

Copy link
Copy Markdown
Member

AI-assisted review of the debugger-asset wiring. The mechanism works for the generator ITK itself was configured with, but the usage requirements are baked at ITK configure time and consumed by projects that may use a different generator, so several paths either break downstream configure or silently do nothing.

Blocking: the $<INSTALL_INTERFACE:...> entries in target_sources make the installed .natvis/.natstepfilter mandatory existing files for every consumer of ITK::ITKCommon.

1. INSTALL_INTERFACE sources make the debug assets a hard requirement for consumers (Modules/Core/Common/src/CMakeLists.txt:308)

$<INSTALL_INTERFACE:...> in target_sources lands in INTERFACE_SOURCES of the exported target. Reproduced with a minimal provider/consumer pair: the generated Targets.cmake contains INTERFACE_SOURCES "${_IMPORT_PREFIX}/share/nv/ITK.natvis", and a consumer doing target_link_libraries(app PRIVATE mylib) fails at generate time with

CMake Error at CMakeLists.txt:6 (target_link_libraries):
  Cannot find source file: .../share/nv/ITK.natvis

under both Ninja and Unix Makefiles.

The install(FILES ...) at line 313 is COMPONENT Development, so an install of only RuntimeLibraries — or any repackaging that prunes share/ — produces an ITK whose every downstream project fails to configure. An optional debugger convenience file should not be able to break a consumer's configure step.

2. LINK_DEPENDS is on ITKCommon, but /NATVIS: is INTERFACE-only (Modules/Core/Common/src/CMakeLists.txt:293)

target_link_options(ITKCommon INTERFACE ...) populates only INTERFACE_LINK_OPTIONS, while LINK_DEPENDS is a non-transitive property set on ITKCommon itself. Reproduced on Ninja: build libmylib.so carries | .../ITK.natvis as a dependency but no /NATVIS: in its LINK_FLAGS; build app has LINK_FLAGS = /NATVIS:.../ITK.natvis and no .natvis dependency at all.

Consequence on MSVC+Ninja: editing Utilities/Debugger/ITK.natvis and rebuilding relinks only ITKCommon.dll. Every test/example executable keeps the stale copy embedded in its PDB until a clean rebuild.

Additionally, with BUILD_SHARED_LIBS=OFF (ITK's default) ITKCommon is a static library and has no link step, so LINK_DEPENDS is ignored outright and nothing re-links.

3. The generator branch is decided by ITK's generator, not the consumer's (Modules/Core/Common/src/CMakeLists.txt:284)

The if(CMAKE_GENERATOR MATCHES "Ninja") decision is frozen into the export at ITK configure time, but the two branches produce mechanisms that only work under their own generator.

  • ITK built with Visual Studio → export carries INTERFACE_SOURCES only. A downstream project configured with -G Ninja treats the .natvis as an inert non-compiled source and never passes /NATVIS: to link.exe. No visualizers.
  • ITK built with Ninja → export carries INTERFACE_LINK_OPTIONS only, so a downstream Visual Studio project gets the /NATVIS: flag but no .natstepfilter in its project source list.

Either way the consumer silently gets less than advertised.

4. ITK.natstepfilter is installed but never wired up for Ninja (Modules/Core/Common/src/CMakeLists.txt:286)

The Ninja branch references only ${ITK_NATVIS_FILE}. There is no linker-flag equivalent of /NATVIS: for .natstepfilter — VS 2022 17.6+ picks it up only from a project's source list — and the Ninja branch never adds it.

So on the standard MSVC+Ninja configuration, F11 on filter->Update() still lands in itk::SmartPointer::operator-> and itk::Object::Register exactly as before. The file is nevertheless installed into share/ITK-6.0/Debugger, which reads as "this is wired up". The deleted default.natstepfilter at least documented a manual copy path; that is now gone with no replacement for these users.

5. MATCHES "Ninja" does not match NMake / MinGW Makefiles (Modules/Core/Common/src/CMakeLists.txt:284)

The comment on line 285 says "Ninja/Makefiles Generator support", but the regex matches only Ninja and Ninja Multi-Config. NMake Makefiles, NMake Makefiles JOM, and MinGW Makefiles fall into the else() branch, whose target_sources mechanism is Visual-Studio-generator-specific.

Verified that Makefile generators silently drop an unknown-extension source: add_executable(app m.cxx ITK.natvis) with -G "Unix Makefiles" configures successfully and no generated makefile references the file. So an NMake Makefiles build — a common MSVC command-line setup — emits no /NATVIS:, gets no visualizers, and produces no diagnostic explaining why.

6. The std:: NoStepInto rule is shipped active while the comment says it is disabled (Utilities/Debugger/ITK.natstepfilter:7-8)
<!-- We can also disable stepping into STL functions by uncommeting the next line: -->
<Function><Name>std::.+</Name><Action>NoStepInto</Action></Function>

Line 8 is not commented out, so the comment asserts the opposite of the shipped state.

This matters more than a stale comment because the rule is no longer opt-in: the VS-generator branch injects the filter into every consuming project. A downstream developer loses F11 into anything reached through a std:: frame — their own comparator invoked via std::sort, their own lambda invoked via std::for_each/std::function — and the debugger steps over the whole call. When they open the file to diagnose it, the comment tells them the rule is inactive. There is also no build switch to turn it off.

(Also flagged separately as a behavioral concern: force-applying a std::.+ NoStepInto to all consumers is a policy decision that arguably belongs behind a CMake option, or should be shipped commented out as the comment implies.)

7. Absolute ITK_INSTALL_DATA_DIR produces an impossible /NATVIS: path (Modules/Core/Common/src/CMakeLists.txt:290)

$<INSTALL_INTERFACE:/NATVIS:$<INSTALL_PREFIX>/${ITK_INSTALL_DATA_DIR}/Debugger/ITK.natvis> assumes ITK_INSTALL_DATA_DIR is relative, but the top-level CMakeLists.txt:228 only defaults it (if(NOT ITK_INSTALL_DATA_DIR)), so a packager may set it absolutely.

With -DITK_INSTALL_DATA_DIR=C:/ProgramData/ITK/share, install(FILES ...) writes to the absolute location but the exported option becomes /NATVIS:<prefix>/C:/ProgramData/ITK/share/Debugger/ITK.natvis, which cannot exist. Downstream links then either fail on the unreadable argument or silently produce binaries with no visualizers, and the nonsensical path makes the cause hard to spot.

8. The manual-install instruction was deleted with no replacement (Utilities/Debugger/ITK.natvis:2)

The removed line

<!-- e.g. copy into C:\Program Files (x86)\...\Debugger\Visualizers\ITK.natvis -->

was the only documented path for users who do not consume ITK through its exported CMake targets: hand-maintained .vcxproj files, attaching to a prebuilt ITK-based binary, or non-CMake build systems. Those users now see raw m_Pointer / m_InternalArray members with nothing in the repository telling them how to install the file themselves. Worth keeping the instruction, or documenting the copy path in the migration guide.

9. INTERFACE propagation reaches every target that links ITKCommon (Modules/Core/Common/src/CMakeLists.txt:286) — cleanup

Attaching the assets to ITKCommon INTERFACE means every ITK library, wrapping module, and test executable picks them up: ~1000 targets re-embedding the visualizer into their own PDB (Ninja), or carrying two extra non-buildable entries in their .vcxproj and Solution Explorer (VS). The benefit only accrues to the handful of targets a developer actually debugs. Worth considering whether this should be opt-in per target, or gated on a CMake option.

@hjmjohnson

Copy link
Copy Markdown
Member

@dzenanz The review in the previous comment should not be viewed as a blocker; these are concerns that arose during an AI code review. I wanted to bring these concerns to your attention.

@dzenanz

dzenanz commented Jul 29, 2026

Copy link
Copy Markdown
Member Author

I will try to address some of it.

@dzenanz
dzenanz marked this pull request as draft July 29, 2026 13:38
@dzenanz

dzenanz commented Jul 29, 2026

Copy link
Copy Markdown
Member Author

Mixing VS and Ninja generators never worked for me. I will not even attempt to support this combination. I am now building with Ninja generator.

@dzenanz

dzenanz commented Jul 29, 2026

Copy link
Copy Markdown
Member Author

Compiling with ninja worked without any issues, both against build tree and install tree. The compiled test executable works.

 * Generalize FixedArray for template types other than float/double
 * Add customized member names for Point

Add new visualizers for:
 * Vector
 * CovariantVector
 * ContinuousIndex
 * RGBPixel
 * RGBAPixel
 * VariableLengthVector
 * Matrix
@dzenanz
dzenanz marked this pull request as ready for review July 29, 2026 13:58
@dzenanz

dzenanz commented Jul 29, 2026

Copy link
Copy Markdown
Member Author

Testing with Ninja+MSVC 2026 revealed no problems:

**********************************************************************
** Visual Studio 2026 Developer Command Prompt v18.8.1
** Copyright (c) 2026 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'

C:\Program Files\Microsoft Visual Studio\18\Community>cmake-gui

C:\Program Files\Microsoft Visual Studio\18\Community>cd C:/Misc/ITK-patches-dev-ninja-26

C:\Misc\ITK-patches-dev-ninja-26>ninja
[0/2] Re-checking globbed directories...
[1566/1811] Building CXX object Modules\ThirdParty\GoogleT...-build\googletest\CMakeFiles\gtest.dir\src\gtest-all.cc.ob
cl : Command line warning D9025 : overriding '/W0' with '/W4'
[1678/1811] Building CXX object Modules\ThirdParty\GoogleT...\googletest\CMakeFiles\gtest_main.dir\src\gtest_main.cc.ob
cl : Command line warning D9025 : overriding '/W0' with '/W4'
[1810/1811] Linking CXX executable bin\itkTestDriver.exe

C:\Misc\ITK-patches-dev-ninja-26>ninja
[0/2] Re-checking globbed directories...
[116/117] Linking CXX executable bin\itkTestDriver.exe

C:\Misc\ITK-patches-dev-ninja-26>ninja install
[0/2] Re-checking globbed directories...
[0/2] Install the project...-- Install configuration: "Debug"
-- Installing: C:/Misc/ITK-patches-dev-ninja-26-installed/lib/itkdouble-conversion-6.0.lib
-- Installing: C:/Misc/ITK-patches-dev-ninja-26-installed/include/ITK-6.0/bignum-dtoa.h
...
-- Installing: C:/Misc/ITK-patches-dev-ninja-26-installed/include/ITK-6.0/itkWatershedSegmentTreeGenerator.hxx
-- Installing: C:/Misc/ITK-patches-dev-ninja-26-installed/lib/ITKWatersheds-6.0.lib
-- Installing: C:/Misc/ITK-patches-dev-ninja-26-installed/include/ITK-6.0/ITKWatershedsExport.h
-- Installing: C:/Misc/ITK-patches-dev-ninja-26-installed/lib/cmake/ITK-6.0/Modules/ITKWatersheds.cmake
-- Up-to-date: C:/Misc/ITK-patches-dev-ninja-26-installed/include/ITK-6.0
-- Installing: C:/Misc/ITK-patches-dev-ninja-26-installed/include/ITK-6.0/itkStructuralSimilarityImageFilter.h
-- Installing: C:/Misc/ITK-patches-dev-ninja-26-installed/include/ITK-6.0/itkStructuralSimilarityImageFilter.hxx
-- Installing: C:/Misc/ITK-patches-dev-ninja-26-installed/lib/cmake/ITK-6.0/Modules/StructuralSimilarity.cmake
-- Installing: C:/Misc/ITK-patches-dev-ninja-26-installed/lib/cmake/ITK-6.0/ITKConfig.cmake
-- Installing: C:/Misc/ITK-patches-dev-ninja-26-installed/lib/cmake/ITK-6.0/ITKConfigVersion.cmake
-- Installing: C:/Misc/ITK-patches-dev-ninja-26-installed/lib/cmake/ITK-6.0/ITKModuleAPI.cmake
-- Installing: C:/Misc/ITK-patches-dev-ninja-26-installed/lib/cmake/ITK-6.0/UseITK.cmake
-- Installing: C:/Misc/ITK-patches-dev-ninja-26-installed/lib/cmake/ITK-6.0/ITKFactoryRegistration.cmake
-- Installing: C:/Misc/ITK-patches-dev-ninja-26-installed/lib/cmake/ITK-6.0/itkFFTImageFilterInitFactoryRegisterManager.h.in
-- Installing: C:/Misc/ITK-patches-dev-ninja-26-installed/lib/cmake/ITK-6.0/itkImageIOFactoryRegisterManager.h.in
-- Installing: C:/Misc/ITK-patches-dev-ninja-26-installed/lib/cmake/ITK-6.0/itkTransformIOFactoryRegisterManager.h.in
-- Installing: C:/Misc/ITK-patches-dev-ninja-26-installed/lib/cmake/ITK-6.0/itkMeshIOFactoryRegisterManager.h.in
-- Installing: C:/Misc/ITK-patches-dev-ninja-26-installed/lib/cmake/ITK-6.0/ITKInitializeCXXStandard.cmake
-- Installing: C:/Misc/ITK-patches-dev-ninja-26-installed/lib/cmake/ITK-6.0/ITKTargets.cmake
-- Installing: C:/Misc/ITK-patches-dev-ninja-26-installed/lib/cmake/ITK-6.0/ITKTargets-debug.cmake
-- Installing: C:/Misc/ITK-patches-dev-ninja-26-installed/share/doc/ITK-6.0/LICENSE
-- Installing: C:/Misc/ITK-patches-dev-ninja-26-installed/share/doc/ITK-6.0/NOTICE
-- Installing: C:/Misc/ITK-patches-dev-ninja-26-installed/share/doc/ITK-6.0/README.md


C:\Misc\ITK-patches-dev-ninja-26>cd C:/Misc/Tester-vs26-ninja-installed

C:\Misc\Tester-vs26-ninja-installed>ninja
[2/2] Linking CXX executable tester.exe

C:\Misc\Tester-vs26-ninja-installed>tester.exe c:\a\CBCT.nrrd
Image read successfully:
Image (0000028D4C306730)
  RTTI typeinfo:   class itk::Image<short,3>
  Reference Count: 1
  Modified Time: 262
  Debug: Off
  Object Name:
  Observers:
    none
  Source: (0000028D4BC4D580)
  Source output name: Primary
  Release Data: Off
  Data Released: False
  Global Release Data: Off
  PipelineMTime: 61
  UpdateMTime: 263
  RealTimeStamp: 0 seconds
  LargestPossibleRegion:
    Dimension: 3
    Index: [0, 0, 0]
    Size: [667, 667, 433]
  BufferedRegion:
    Dimension: 3
    Index: [0, 0, 0]
    Size: [667, 667, 433]
  RequestedRegion:
    Dimension: 3
    Index: [0, 0, 0]
    Size: [667, 667, 433]
  Spacing: [0.25, 0.25, 0.25]
  Origin: [-83.25, -83.25, -54]
  Direction:
    Matrix (3x3)
      1 0 0
      0 1 0
      0 0 1
  IndexToPointMatrix:
    Matrix (3x3)
      0.25 0 0
      0 0.25 0
      0 0 0.25
  PointToIndexMatrix:
    Matrix (3x3)
      4 0 0
      0 4 0
      0 0 4
  Inverse Direction:
    Matrix (3x3)
      1 0 0
      0 1 0
      0 0 1
  PixelContainer:
    ImportImageContainer (0000028D4C306A40)
      RTTI typeinfo:   class itk::ImportImageContainer<unsigned __int64,short>
      Reference Count: 1
      Modified Time: 260
      Debug: Off
      Object Name:
      Observers:
        none
      Pointer: 0000028D4C462070
      Container manages memory: true
      Size: 192636937
      Capacity: 192636937

Image metadata:
ITK_InputFilterName: NrrdImageIO
ITK_original_direction: 1 0 0
0 1 0
0 0 1

ITK_original_spacing: [0.25, 0.25, 0.25]
NRRD_kinds[0]: domain
NRRD_kinds[1]: domain
NRRD_kinds[2]: domain
NRRD_space: left-posterior-superior

C:\Misc\Tester-vs26-ninja-installed>cd C:/Misc/Tester-vs26-ninja

C:\Misc\Tester-vs26-ninja>ninja
[2/2] Linking CXX executable tester.exe

C:\Misc\Tester-vs26-ninja>tester.exe c:\a\CBCT.nrrd
Image read successfully:
Image (0000021D102381D0)
  RTTI typeinfo:   class itk::Image<short,3>
  Reference Count: 1
  Modified Time: 262
  Debug: Off
  Object Name:
  Observers:
    none
  Source: (0000021D0DC9D800)
  Source output name: Primary
  Release Data: Off
  Data Released: False
  Global Release Data: Off
  PipelineMTime: 61
  UpdateMTime: 263
  RealTimeStamp: 0 seconds
  LargestPossibleRegion:
    Dimension: 3
    Index: [0, 0, 0]
    Size: [667, 667, 433]
  BufferedRegion:
    Dimension: 3
    Index: [0, 0, 0]
    Size: [667, 667, 433]
  RequestedRegion:
    Dimension: 3
    Index: [0, 0, 0]
    Size: [667, 667, 433]
  Spacing: [0.25, 0.25, 0.25]
  Origin: [-83.25, -83.25, -54]
  Direction:
    Matrix (3x3)
      1 0 0
      0 1 0
      0 0 1
  IndexToPointMatrix:
    Matrix (3x3)
      0.25 0 0
      0 0.25 0
      0 0 0.25
  PointToIndexMatrix:
    Matrix (3x3)
      4 0 0
      0 4 0
      0 0 4
  Inverse Direction:
    Matrix (3x3)
      1 0 0
      0 1 0
      0 0 1
  PixelContainer:
    ImportImageContainer (0000021D102384E0)
      RTTI typeinfo:   class itk::ImportImageContainer<unsigned __int64,short>
      Reference Count: 1
      Modified Time: 260
      Debug: Off
      Object Name:
      Observers:
        none
      Pointer: 0000021D10396070
      Container manages memory: true
      Size: 192636937
      Capacity: 192636937

Image metadata:
ITK_InputFilterName: NrrdImageIO
ITK_original_direction: 1 0 0
0 1 0
0 0 1

ITK_original_spacing: [0.25, 0.25, 0.25]
NRRD_kinds[0]: domain
NRRD_kinds[1]: domain
NRRD_kinds[2]: domain
NRRD_space: left-posterior-superior

C:\Misc\Tester-vs26-ninja>

@dzenanz

dzenanz commented Jul 29, 2026

Copy link
Copy Markdown
Member Author

I am thinking about point 9. Should we expose a CMake option for this? To allow someone to turn it off, if they are trying to minimize size of debugging information (.pdb) files. I mean, the savings would be meager (probably on the order of kilobytes), while the sizes of these files are obscene:
image
I don't see much point in that.

@hjmjohnson

Copy link
Copy Markdown
Member

Should we expose a CMake option for this?
No.
I agree with you. The savings is trivial, and if you are asking for debugging info, you already are not concerned with size too much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:Core Issues affecting the Core module type:Infrastructure Infrastructure/ecosystem related changes, such as CMake or buildbots

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants