Page MenuHomePhabricator

MITK Flowbench -Save Seg not working, due to file naming issues
Closed, InvalidPublic

Description

This is also in the current release (MITK 2021.10). When naming the Segmentation (default in this case), with some spaces and subfolder name, the file is not stored, but no error is shown (in the UI).
I think we had this bug in a previous version, and it was fixed. But it must be a really old version, I tried the one before (a snapshot from April) and it was also not working.

Log output:

working:

[21.653] Writing image: /data/batch/1.3.12.2.1107.5.1.4.73104.30000020081307523376400012735/application-mitk-flow/jk.dcm
210 of 210 slices mapped to source DICOM images
Found 2 label(s)
Skipping label 0
Processing label 1
Total non-empty slices that will be encoded in SEG for label 1 is 210
(inclusive from 0 to 210)

not working:

[23.377] Writing image: /data/batch/1.3.12.2.1107.5.1.4.73104.30000020081307523376400012735/application-mitk-flow/Private^000001_BPL_Abdomen_Winfried (Adult) / Abdomen BPL 5.0 B40f-labels.dcm
210 of 210 slices mapped to source DICOM images
Found 2 label(s)
Skipping label 0
Processing label 1
Total non-empty slices that will be encoded in SEG for label 1 is 210
(inclusive from 0 to 210)

The UI always shows success.

Event Timeline

gaoh added a project: Kaapana (internal).
gaoh added a subscriber: floca.
floca moved this task from Backlog to Segmentation on the MITK (v2022.04) board.

do you set --flow.outputdir? If so who?

just saw it. I guess your problem is that you want to write to a directory that does not exist.

I assume Private^000001_BPL_Abdomen_Winfried (Adult) / Abdomen BPL 5.0 B40f-labels.dcm is the name. It containes a slash and therefor is interpreted as a sub dir and a filename.

On the long run we should have a talk about what is the best way of flow to store the results.

But the easiest way for Kaapana right now is to also provide a node name for the input image (as you do it for the segmentation). Currently you do not specify it. Therefore it automatically construct it out of DICOM tags content and this introduces the slash.

floca triaged this task as Normal priority.Dec 7 2021, 10:52 AM

@gaoh could you join the discussion?
Also may be the worklist feature T29159 would be an additional way to circumvent it.?!?

gaoh lowered the priority of this task from Normal to Low.May 16 2022, 10:02 AM

Yes, so I changed it already, and I am using the seriesUID as name for the images. Additionally, I had to add the layer property: Because by introducing the image name property, somehow the layer is also set (to a high number, probably). When I create a new SEG without setting the layer of the image to 0, the SEG is only put on top, when opening the data manager.

So basically there is a workaround for this bug. I would still keep the bug with low priority open, since it would be nicer to have e.g. a regex testing the allowed character set, before saving, or in general, checking if the file is really created, when clicking on the save button.

@gaoh maybe also the worklist feature covered by T29159 would also help/suffice? Than you could explicitly define the output path.

yes, that will help. Also, this worklist will be quite helpful, allowing a new form of "batch-processing".

theoretically yes, but I guess it is not relevant. Since we now use the tasklist feature. And before that, I used the described workaround. So this is not needed anymore.