OpenHeartDevelopers / CemrgApp

An Interactive Medical Imaging Platform with Image Processing and Computer Vision Toolkits for Cardiovascular Research.
http://www.cemrgapp.com
BSD 3-Clause "New" or "Revised" License
18 stars 8 forks source link

Alternative DICOM reader failing on macOS due to _touch_ command #30

Closed alonsoJASL closed 3 years ago

alonsoJASL commented 3 years ago

Description

The alternative DICOM reader in macOS does not work. Upon inspection, in the folder specified containing the DICOM files, an empty file called NIIs is created instead.

Steps to Reproduce

On a macOS build:

  1. Load DICOM with the alternative dicom reader
  2. The error presents itself and it's shown

Expected behaviour:

The NIIs folder getting created normally.

Actual behavior:

An empty file called NIIs is created, impeding the creation of the folder and its contents.

Reproduces how often:

Every time using the alternative dicom reader in macOS.

alonsoJASL commented 3 years ago

The touch command, present in all functions of the CemrgCommandLine.cpp, creates an empty file before because docker doesn't let CemrgApp have permissions over the files it creates.

In the case of the alternative dicom reader, the output is a folder (the called NIIs), but CemrgApp creates a file without extension called NIIs. Then the dicom reader tries to create the folder and fails because there's a file.

I will add a flag to the CemrgCommandLine::ExecuteCommand to prevent the usage of the touch command.

alonsoJASL commented 3 years ago

I pushed commit 50eed1b to fix this issue. A few tests should be done to verify that the functions checking for a successful output is good enough.

alonsoJASL commented 3 years ago

The issue was fixed. It is now available in the new version.