Created
October 1, 2024 18:47
-
-
Save kenavolic/acd6a544e58a995f395812c6e404b9de to your computer and use it in GitHub Desktop.
itk::RelabelComponentImageFilter GetSizeOfObjectInPhysicalUnits compilation error
This file contains 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
cmake_minimum_required(VERSION 3.10.2) | |
project(RelabelComponentTest) | |
# Find ITK. | |
find_package(ITK REQUIRED) | |
include(${ITK_USE_FILE}) | |
add_executable(RelabelComponentTest main.cpp) | |
target_compile_options(RelabelComponentTest PRIVATE -Wall -Werror) | |
target_link_libraries(RelabelComponentTest ${ITK_LIBRARIES}) |
This file contains 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
#include "itkImage.h" | |
#include "itkRelabelComponentImageFilter.h" | |
int main() | |
{ | |
using ImageType = itk::Image< signed short, 3 >; | |
using FilterType = itk::RelabelComponentImageFilter<ImageType, ImageType>; | |
using LabelType = FilterType::LabelType; | |
LabelType l{}; | |
//itk::SizeValueType i{}; | |
auto relabeler = FilterType::New(); | |
relabeler->GetSizeOfObjectInPhysicalUnits(l); | |
//relabeler->GetSizeOfObjectInPhysicalUnits(i); // i converted to LabelType leading to same error | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment