Skip to content

Commit

Permalink
Change SeriesInstanceUID precedence
Browse files Browse the repository at this point in the history
SeriesInstanceUID  precedence (#655)
  • Loading branch information
neurolabusc committed Nov 27, 2022
1 parent be2f6c5 commit c269a1a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion console/nii_dicom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4536,6 +4536,7 @@ const uint32_t kEffectiveTE = 0x0018 + (0x9082 << 16);
int philMRImageDiffBValueNumber = 0;
int philMRImageDiffVolumeNumber = -1;
int sqDepth = 0;
int seriesInstanceUIDsqDepth = 65535; //issue655
int acquisitionTimesGE_UIH = 0;
int sqDepth00189114 = -1;
bool hasDwiDirectionality = false;
Expand Down Expand Up @@ -5788,8 +5789,9 @@ const uint32_t kEffectiveTE = 0x0018 + (0x9082 << 16);
dcmStr(lLength, &buffer[lPos], d.studyInstanceUID);
break;
case kSeriesInstanceUID: // 0020,000E
if (sqDepth > seriesInstanceUIDsqDepth) break; //issue655
seriesInstanceUIDsqDepth = sqDepth;
dcmStr(lLength, &buffer[lPos], d.seriesInstanceUID);
//printMessage(">>%s\n", d.seriesInstanceUID);
d.seriesUidCrc = mz_crc32X((unsigned char *)&d.seriesInstanceUID, strlen(d.seriesInstanceUID));
break;
case kImagePositionPatient: {
Expand Down
2 changes: 1 addition & 1 deletion console/nii_dicom.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ extern "C" {
#define kCPUsuf " " //unknown CPU
#endif

#define kDCMdate "v1.0.20221121"
#define kDCMdate "v1.0.20221127"
#define kDCMvers kDCMdate " " kJP2suf kLSsuf kCCsuf kCPUsuf

static const int kMaxEPI3D = 1024; //maximum number of EPI images in Siemens Mosaic
Expand Down

2 comments on commit c269a1a

@ig1401
Copy link

@ig1401 ig1401 commented on c269a1a Jan 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, We are facing the same issue of splitting the dicom images into different parts from Siemens MRI scanner. I work mostly on Python version of the dcm2niix and make docker out of it. Is this on C++ is also applied to the python version? Thansk in advance.

@neurolabusc
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dcm2niix is only a compiled C program. You can call it from Python or any scripting language. The main branch on Github always stores the current stable release. To try out the upcoming features you can compile the development branch. If you want to get a pre-compiled executable from the development branch you can go to appveyor for the desired build, choose your operating system (Win, Linux, Mac) and download the artifact

Please sign in to comment.