Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

metaDataProvider imagePlaneModule get pixelSpacing #32

Open
DStar2013 opened this issue Apr 4, 2019 · 0 comments
Open

metaDataProvider imagePlaneModule get pixelSpacing #32

DStar2013 opened this issue Apr 4, 2019 · 0 comments

Comments

@DStar2013
Copy link

metaDataProvider
`if (type === 'imagePlaneModule') {

const imageOrientationPatient = getNumberValues(dataSet, 'x00200037', 6);
const imagePositionPatient = getNumberValues(dataSet, 'x00200032', 3);
const pixelSpacing = getNumberValues(dataSet, 'x00280030', 2);
let columnPixelSpacing = null;
let rowPixelSpacing = null;

if (pixelSpacing) {
  rowPixelSpacing = pixelSpacing[0];
  columnPixelSpacing = pixelSpacing[1];
}

let rowCosines = null;
let columnCosines = null;

if (imageOrientationPatient) {
  rowCosines = [parseFloat(imageOrientationPatient[0]), parseFloat(imageOrientationPatient[1]), parseFloat(imageOrientationPatient[2])];
  columnCosines = [parseFloat(imageOrientationPatient[3]), parseFloat(imageOrientationPatient[4]), parseFloat(imageOrientationPatient[5])];
}

return {
  frameOfReferenceUID: dataSet.string('x00200052'),
  rows: dataSet.uint16('x00280010'),
  columns: dataSet.uint16('x00280011'),
  imageOrientationPatient,
  rowCosines,
  columnCosines,
  imagePositionPatient,
  sliceThickness: dataSet.floatString('x00180050'),
  sliceLocation: dataSet.floatString('x00201041'),
  pixelSpacing,
  rowPixelSpacing,
  columnPixelSpacing
};

}`

if dicom refined. it has pixelspacing or sometimes only has imagePixelSpacing.
naybe can do some compatibility?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant