diff --git a/src/js/bruker2dicom/modules/image.js b/src/js/bruker2dicom/modules/image.js index 39b4e3e9..766fb2f9 100644 --- a/src/js/bruker2dicom/modules/image.js +++ b/src/js/bruker2dicom/modules/image.js @@ -128,12 +128,12 @@ _module.ImagePixel = function(indexGenerator, dicomDataset, brukerDataset, toDicom( indexGenerator, dicomDataset, 'Rows', brukerDataset, 'VisuCoreSize', 1, undefined, - function(brukerDataset) { return [ brukerDataset.VisuCoreSize[0] ]; } ); + function(brukerDataset) { return [ brukerDataset.VisuCoreSize[1] ]; } ); toDicom( indexGenerator, dicomDataset, 'Columns', brukerDataset, 'VisuCoreSize', 1, undefined, - function(brukerDataset) { return [ brukerDataset.VisuCoreSize[1] ]; } ); + function(brukerDataset) { return [ brukerDataset.VisuCoreSize[0] ]; } ); dicomDataset[dicomifier.dictionary['BitsAllocated'][1]] = { 'vr': dicomifier.dictionary['BitsAllocated'][0], 'Value': [ 16 ] }; diff --git a/src/lib/nifti/Dicom2Nifti.cpp b/src/lib/nifti/Dicom2Nifti.cpp index 77277cdc..1b2087c6 100644 --- a/src/lib/nifti/Dicom2Nifti.cpp +++ b/src/lib/nifti/Dicom2Nifti.cpp @@ -196,13 +196,13 @@ ::extract_information_from_dataset(Json::Value const & dataset, static_cast(Dicom2Nifti::get_distance_between_slice(dataset)); nim->nvox *= nim->dim[3]; - nim->dim[2] = nim->ny = dataset.get("Columns", Json::Value())[0].asInt(); + nim->dim[2] = nim->ny = dataset.get("Rows", Json::Value())[0].asInt(); nim->pixdim[2] = nim->dy = static_cast( dataset.get("PixelSpacing", Json::Value())[1].asDouble() ); nim->nvox *= nim->dim[2]; - nim->dim[1] = nim->nx = dataset.get("Rows", Json::Value())[0].asInt(); + nim->dim[1] = nim->nx = dataset.get("Columns", Json::Value())[0].asInt(); nim->pixdim[1] = nim->dx = static_cast( dataset.get("PixelSpacing", Json::Value())[0].asDouble() );