Voxel mask is in the wrong location

Hi Heiner,
sorry, yes these are two different scans. I should have selected MRI2, not MRI1 (as MRI2 is the one I mentioned is having issues with voxel placement).

Here is the output (MRI2)

                              Filename: '/data/project/SV2A_MC1/LEV/sourcedata/sub-223/ses-MRI2/20-ACC_svs_se_30_noECC/resources/secondary/2.25.32491572345396840739318711101525313657-20-1-anwtlt.dcm'
                           FileModDate: '05-Aug-2024 09:41:00'
                              FileSize: 116584
                                Format: 'DICOM'
                         FormatVersion: 3
                                 Width: 1
                                Height: 1
                              BitDepth: []
                             ColorType: ''
        FileMetaInformationGroupLength: 174
            FileMetaInformationVersion: [2×1 uint8]
               MediaStorageSOPClassUID: '1.2.840.10008.5.1.4.1.1.4.2'
            MediaStorageSOPInstanceUID: '2.25.256577899615104464943943200131520304722'
                     TransferSyntaxUID: '1.2.840.10008.1.2.1'
                ImplementationClassUID: '1.2.40.0.13.1.1'
             ImplementationVersionName: 'dcm4che-2.0'
                  SpecificCharacterSet: 'ISO_IR 100'
                             ImageType: 'ORIGINAL\PRIMARY\SPECTROSCOPY\NONE'
                           SOPClassUID: '1.2.840.10008.5.1.4.1.1.4.2'
                        SOPInstanceUID: '2.25.256577899615104464943943200131520304722'
                             StudyDate: '20240703'
                            SeriesDate: '20240703'
                           ContentDate: '20240703'
                   AcquisitionDateTime: '20240703133314.540000'
                             StudyTime: '131848.400000'
                            SeriesTime: '133803.344000'
                           ContentTime: '133803.348000'
                       AccessionNumber: '2.25.290070988920337595058960832122557831312'
                              Modality: 'MR'
                          Manufacturer: 'Siemens Healthineers'
                      StudyDescription: '223 Placebo Synaptic_Connectivity'
                     SeriesDescription: 'ACC_svs_se_30_noECC'
               PerformingPhysicianName: [1×1 struct]
                 ManufacturerModelName: 'MAGNETOM Prisma'
       ReferencedImageEvidenceSequence: [1×1 struct]
                  VolumetricProperties: 'DISTORTED'
       VolumeBasedCalculationTechnique: 'NONE'
                 ComplexImageComponent: 'COMPLEX'
                   AcquisitionContrast: ''
             Private_0009_10xx_Creator: 'SIEMENS SYNGO INDEX SERVICE'
                     Private_0009_108c: ''
                           PatientName: [1×1 struct]
                             PatientID: '223_Placebo'
                            PatientSex: 'M'
                            PatientAge: '056Y'
                           PatientSize: 1.7780
                         PatientWeight: 77
                DeidentificationMethod: 'RSU XNAT Migration Anonymisation'
    DeidentificationMethodCodeSequence: [1×1 struct]
                      BodyPartExamined: 'HEAD'
                 MagneticFieldStrength: 3
                    DeviceSerialNumber: '166001'
                      SoftwareVersions: 'syngo MR XA30'
                          ProtocolName: 'ACC_svs_se_30'
                     SpatialResolution: 1
                 DateOfLastCalibration: '20090304'
                 TimeOfLastCalibration: '123723'
                                 B1rms: 0.4742
                       PatientPosition: 'HFS'
                  ContentQualification: 'PRODUCT'
                     PulseSequenceName: '*svs_se'
                     EchoPulseSequence: 'SPIN'
                      MultipleSpinEcho: 'NO'
                 MultiPlanarExcitation: 'NO'
              SteadyStatePulseSequence: 'NONE'
               EchoPlanarPulseSequence: 'NO'
         SpectrallySelectedSuppression: 'NONE'
             GeometryOfKSpaceTraversal: 'RECTILINEAR'
              SegmentedKSpaceTraversal: 'SINGLE'
      RectilinearPhaseEncodeReordering: 'LINEAR'
                         SpectralWidth: 2500
                ChemicalShiftReference: 4.7000
           VolumeLocalizationTechnique: 'PRESS'
                            Decoupling: 'NO'
                       KSpaceFiltering: 'NONE'
                   TimeDomainFiltering: 'NONE'
                     NumberOfZeroFills: 0
                    BaselineCorrection: 'NONE'
                   AcquisitionDuration: 288
            NumberOfKSpaceTrajectories: 96
                  TransmitterFrequency: 123.2563
                       ResonantNucleus: '1H'
                   FrequencyCorrection: 'NO'
            VolumeLocalizationSequence: [1×1 struct]
        ApplicableSafetyStandardAgency: 'IEC'
             FirstOrderPhaseCorrection: 'NO'
        WaterReferencedPhaseCorrection: 'NO'
         MRSpectroscopyAcquisitionType: 'SINGLE_VOXEL'
                      StudyInstanceUID: '2.25.32491572345396840739318711101525313657'
                     SeriesInstanceUID: '2.25.281001225998221136498368569177969505290'
                          SeriesNumber: 20
                     AcquisitionNumber: 1
                        InstanceNumber: 1
                   FrameOfReferenceUID: '2.25.183037375415414858825769564518733185486'
            PositionReferenceIndicator: ''
         DimensionOrganizationSequence: [1×1 struct]
                DimensionIndexSequence: [1×1 struct]
             Private_0021_10xx_Creator: 'SIEMENS MR MRS 05'
             Private_0021_11xx_Creator: 'SIEMENS MR SDR 01'
                     Private_0021_1001: 300.5098
                     Private_0021_1101: 'ACQUISITION'
                     Private_0021_1102: 'ACQUISITION'
                        NumberOfFrames: 1
                                  Rows: 1
                               Columns: 1
                         DataPointRows: 1
                      DataPointColumns: 2048
                   SignalDomainColumns: 'TIME'
                    DataRepresentation: 'COMPLEX'
       PerformedProcedureStepStartDate: '20240703'
       PerformedProcedureStepStartTime: '131848.400000'
         PerformedProcedureStepEndDate: '20240703'
              PerformedProcedureStepID: 'USa47e067974314b'
     PerformedProcedureStepDescription: '223 Placebo Synaptic_Connectivity'
            AcquisitionContextSequence: [1×1 struct]
      IssueDateOfImagingServiceRequest: '20240703'
        SharedFunctionalGroupsSequence: [1×1 struct]
      PerFrameFunctionalGroupsSequence: [1×1 struct]
                      SpectroscopyData: [4096×1 single]
And here is the other data (MRI2)

I have managed to run it with nifti files recently but with some workarounds.

  1. I select no PDF output in the job file (per errors mentioned here)
  2. I have to specify the basis file, because unlike with dicoms it can no longer identify the right one automatically.
  3. When it gets to coregistration and segmentation I get an error about unknown vendor so I just type MRSCont.vendor = 'Siemens'; in the terminal and then I continue running the script with:
    MRSCont = OspreyCoreg(MRSCont);
    MRSCont = OspreySeg(MRSCont);
    

It’s not the most optimal but using nifti files does place the voxels in correct locations, so at least it works.