Read Image orientation to property
This commit is contained in:
@@ -121,6 +121,15 @@ void DICOMDirectoryHelper::getFileProperty(const std::string &path, DICOMFileMap
|
||||
dataset->findAndGetFloat64(DcmTagKey(0x0028, 0x0030), Spacing[1], 1);
|
||||
seriesProperty->SetSpacing(Spacing);
|
||||
|
||||
double orientation[6] = {.0, .0, .0, .0, .0, .0};
|
||||
dataset->findAndGetFloat64(DcmTagKey(0x0020, 0x0037), orientation[0], 0);
|
||||
dataset->findAndGetFloat64(DcmTagKey(0x0020, 0x0037), orientation[1], 1);
|
||||
dataset->findAndGetFloat64(DcmTagKey(0x0020, 0x0037), orientation[2], 2);
|
||||
dataset->findAndGetFloat64(DcmTagKey(0x0020, 0x0037), orientation[3], 3);
|
||||
dataset->findAndGetFloat64(DcmTagKey(0x0020, 0x0037), orientation[4], 4);
|
||||
dataset->findAndGetFloat64(DcmTagKey(0x0020, 0x0037), orientation[5], 5);
|
||||
seriesProperty->SetDirectionCosine(orientation);
|
||||
|
||||
unsigned short SamplePerPixel = 0;
|
||||
dataset->findAndGetUint16(DcmTagKey(0x0028, 0x0002), SamplePerPixel);
|
||||
seriesProperty->SetSamplePerPixel(SamplePerPixel);
|
||||
|
||||
Reference in New Issue
Block a user