Skip to content

Commit

Permalink
Fix switch between rows and columns
Browse files Browse the repository at this point in the history
  • Loading branch information
lamyj committed Mar 21, 2016
1 parent 0416b8d commit fe2311c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/js/bruker2dicom/modules/image.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ] };
Expand Down
4 changes: 2 additions & 2 deletions src/lib/nifti/Dicom2Nifti.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,13 +196,13 @@ ::extract_information_from_dataset(Json::Value const & dataset,
static_cast<float>(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<float>( 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<float>( dataset.get("PixelSpacing",
Json::Value())[0].asDouble() );
Expand Down

0 comments on commit fe2311c

Please sign in to comment.