We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have been trying to rotate a vtkVolume that has been generated by the cornerstone volume loader (@cornerstonejs\core\dist\esm\loaders\volumeLoader.js) doesn't work unless I modify the function: function createInternalVTKRepresentation(volume) { const { dimensions, metadata, spacing, direction, origin } = volume; const { PhotometricInterpretation } = metadata; let numComponents = 1; if (PhotometricInterpretation === 'RGB') { numComponents = 3; } const imageData = vtkImageData.newInstance(); const dataArrayAttrs = { numberOfComponents: numComponents }; imageData.setDimensions(dimensions); imageData.setSpacing(spacing); imageData.setDirection(direction); imageData.setOrigin([0, 0, 0]); if (volume.isDynamicVolume()) { const scalarDataArrays = (volume).getScalarDataArrays(); addScalarDataArraysToImageData(imageData, scalarDataArrays, dataArrayAttrs); } else { const scalarData = volume.getScalarData(); addScalarDataToImageData(imageData, scalarData, dataArrayAttrs); } return imageData; }
function createInternalVTKRepresentation(volume) { const { dimensions, metadata, spacing, direction, origin } = volume; const { PhotometricInterpretation } = metadata; let numComponents = 1; if (PhotometricInterpretation === 'RGB') { numComponents = 3; } const imageData = vtkImageData.newInstance(); const dataArrayAttrs = { numberOfComponents: numComponents }; imageData.setDimensions(dimensions); imageData.setSpacing(spacing); imageData.setDirection(direction); imageData.setOrigin([0, 0, 0]); if (volume.isDynamicVolume()) { const scalarDataArrays = (volume).getScalarDataArrays(); addScalarDataArraysToImageData(imageData, scalarDataArrays, dataArrayAttrs); } else { const scalarData = volume.getScalarData(); addScalarDataToImageData(imageData, scalarData, dataArrayAttrs); } return imageData; }
Is there a way to create and utilize a custom volume loader with this change?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I have been trying to rotate a vtkVolume that has been generated by the cornerstone volume loader (@cornerstonejs\core\dist\esm\loaders\volumeLoader.js) doesn't work unless I modify the function:
function createInternalVTKRepresentation(volume) { const { dimensions, metadata, spacing, direction, origin } = volume; const { PhotometricInterpretation } = metadata; let numComponents = 1; if (PhotometricInterpretation === 'RGB') { numComponents = 3; } const imageData = vtkImageData.newInstance(); const dataArrayAttrs = { numberOfComponents: numComponents }; imageData.setDimensions(dimensions); imageData.setSpacing(spacing); imageData.setDirection(direction); imageData.setOrigin([0, 0, 0]); if (volume.isDynamicVolume()) { const scalarDataArrays = (volume).getScalarDataArrays(); addScalarDataArraysToImageData(imageData, scalarDataArrays, dataArrayAttrs); } else { const scalarData = volume.getScalarData(); addScalarDataToImageData(imageData, scalarData, dataArrayAttrs); } return imageData; }
Is there a way to create and utilize a custom volume loader with this change?
The text was updated successfully, but these errors were encountered: