You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am encountering an issue where image read results in incorrect values if transfer syntax is other than 1.2.840.10008.1.2. Below is code in GNU-OCTAVE. Is there a way to specify transfer syntax UID so that reader can apply correct decompression. (dcm4che-5.17.0)
dcmFile = '/path/to/scmFile.dcm';
readerSpi = javaObject('org.dcm4che3.imageio.plugins.dcm.DicomImageReaderSpi');
dcmImgReader = javaObject('org.dcm4che3.imageio.plugins.dcm.DicomImageReader',readerSpi);
inputStreamObj = javaObject("java.io.FileInputStream",dcmFile);
in = javaObject("org.dcm4che3.io.DicomInputStream",inputStreamObj);
dcmImgReader.setInput(in)
param = dcmImgReader.getDefaultReadParam;
raster = dcmImgReader.readRaster(0, param); % only one image. hence image index of 0.
h = raster.getHeight;
w = raster.getWidth;
numBands = raster.getNumBands;
if numBands > 1
error('Multi-band image not supported')
end
b = 0; % 1st band
sliceV = raster.getSamples(0,0,w,h,b,[]);
The text was updated successfully, but these errors were encountered:
I am encountering an issue where image read results in incorrect values if transfer syntax is other than 1.2.840.10008.1.2. Below is code in GNU-OCTAVE. Is there a way to specify transfer syntax UID so that reader can apply correct decompression. (dcm4che-5.17.0)
The text was updated successfully, but these errors were encountered: