-
-
Save michaelrossherron/1d0256baf8f38e44af01185477d6e16b to your computer and use it in GitHub Desktop.
16-bit DICOM incorrectly identified as 32-bit
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.1.0) | |
project(SITKTests) | |
find_package(SimpleITK QUIET) | |
add_executable(pixelTypeTest pixelTypeTest.cpp) | |
target_link_libraries(pixelTypeTest ${SimpleITK_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 <SimpleITK.h> | |
#include <iostream> | |
namespace sitk = itk::simple; | |
// usage: pixelTypeTest [/directory/containing/dicom/images/] | |
int main ( int argc, char* argv[] ) | |
{ | |
sitk::ImageSeriesReader reader; | |
reader.SetFileNames(sitk::ImageSeriesReader::GetGDCMSeriesFileNames(argv[1])); | |
sitk::Image image = reader.Execute(); | |
std::cout << image.GetPixelID() << std::endl; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment