Read spacing and position to property
This commit is contained in:
@@ -116,7 +116,7 @@ void DICOMDirectoryHelper::getFileProperty(const std::string &path, DICOMFileMap
|
|||||||
dataset->findAndGetFloat64(DcmTagKey(0x0028, 0x1051), WindowWidth);
|
dataset->findAndGetFloat64(DcmTagKey(0x0028, 0x1051), WindowWidth);
|
||||||
seriesProperty->AddWindowLevelPreset(WindowWidth, WindowCenter);
|
seriesProperty->AddWindowLevelPreset(WindowWidth, WindowCenter);
|
||||||
|
|
||||||
double Spacing[2] = {0.0,0.0};
|
double Spacing[3] = {0.0, 0.0, 0.0};
|
||||||
dataset->findAndGetFloat64(DcmTagKey(0x0028, 0x0030), Spacing[0], 0);
|
dataset->findAndGetFloat64(DcmTagKey(0x0028, 0x0030), Spacing[0], 0);
|
||||||
dataset->findAndGetFloat64(DcmTagKey(0x0028, 0x0030), Spacing[1], 1);
|
dataset->findAndGetFloat64(DcmTagKey(0x0028, 0x0030), Spacing[1], 1);
|
||||||
seriesProperty->SetSpacing(Spacing);
|
seriesProperty->SetSpacing(Spacing);
|
||||||
@@ -130,6 +130,12 @@ void DICOMDirectoryHelper::getFileProperty(const std::string &path, DICOMFileMap
|
|||||||
dataset->findAndGetFloat64(DcmTagKey(0x0020, 0x0037), orientation[5], 5);
|
dataset->findAndGetFloat64(DcmTagKey(0x0020, 0x0037), orientation[5], 5);
|
||||||
seriesProperty->SetDirectionCosine(orientation);
|
seriesProperty->SetDirectionCosine(orientation);
|
||||||
|
|
||||||
|
double position[3] = {.0, .0, .0};
|
||||||
|
dataset->findAndGetFloat64(DcmTagKey(0x0020, 0x0032), position[0], 0);
|
||||||
|
dataset->findAndGetFloat64(DcmTagKey(0x0020, 0x0032), position[1], 1);
|
||||||
|
dataset->findAndGetFloat64(DcmTagKey(0x0020, 0x0032), position[2], 2);
|
||||||
|
seriesProperty->SetPosition(position);
|
||||||
|
|
||||||
unsigned short SamplePerPixel = 0;
|
unsigned short SamplePerPixel = 0;
|
||||||
dataset->findAndGetUint16(DcmTagKey(0x0028, 0x0002), SamplePerPixel);
|
dataset->findAndGetUint16(DcmTagKey(0x0028, 0x0002), SamplePerPixel);
|
||||||
seriesProperty->SetSamplePerPixel(SamplePerPixel);
|
seriesProperty->SetSamplePerPixel(SamplePerPixel);
|
||||||
|
|||||||
Reference in New Issue
Block a user