Hallo,

we have stumbled upon an problem with saving files using MITK.

Image files are not saved (Windows 7, QT 4.8.4) because 
QFileDialog::getSaveFileName (in QmitkIOUtil
::GetFileNameWithQDialog()) always returns a file name with an ".pic," attached 
to the end and therefore mitkImageWriter neglects it as no valid extension.

The windows dialog (qfiledialog_win.h) called by QFileDialog always(!) adds 
".pic,"; it is irrelevant if the proposed file name has already an extension. 
So the default file name is "[yourFilePath].nrrd.pic," and the extension 
checked and rejected by mitkImageWriter is ".nrrd.pic,".

Is this a known bug already? It is not fixed by the patches for bug  15480 and 
bug 13455.

If not, I would file a bug.

One detail:

The filter string passed to QT is
"Image (*.pic, *.pic.gz, *.bmp, *.dcm, *.DCM, *.dicom, *.DICOM, *.gipl, 
*.gipl.gz, *.mha, *.nii, *.nii.gz, *.nrrd, *.nhdr, *.png, *.PNG, *.spr, *.mhd, 
*.vtk, *.vti, *.hdr, *.png, *.tif, *.jpg)"

qt_make_filter_list splits on ";;" or "\n".

Then qt_win_extract_filter tries to extract the filters, splits at " " and 
concats all items with ";".

This results in the following filter string:
"Image;(*.pic,;*.pic.gz,;*.bmp,;*.dcm,;*.DCM,;*.dicom,;*.DICOM,;*.gipl,;*.gipl.gz,;*.mha,;*.nii,;*.nii.gz,;*.nrrd,;*.nhdr,;*.png,;*.PNG,;*.spr,;*.mhd,;*.vtk,;*.vti,;*.hdr,;*.png,;*.tif,;*.jpg)"

Which explains the ".pic,"

A question rises, without the guarantee to remove the problem completely: 
Should the filter string of the mitkImageWriter should be QT compliant?
This would be
"Image (*.pic *.pic.gz *.bmp *.dcm *.DCM *.dicom *.DICOM *.gipl *.gipl.gz *.mha 
*.nii *.nii.gz *.nrrd *.nhdr *.png *.PNG *.spr *.mhd *.vtk *.vti *.hdr *.png 
*.tif *.jpg)" (so without comma).

Kind regards.

Ralf Floca

------------------------------------------------------------------
Dr. Ralf Floca
DKFZ
German Cancer Research Center (Deutsches Krebsforschungszentrum)
Member of the Helmholtz Association
E071 Research Group
Software Development for Integrated Diagnostics and Therapy (SIDT)

Im Neuenheimer Feld 280
D-69120 Heidelberg

Phone: +49 (6221) 42 2560
E-Mail: [email protected]<mailto:[email protected]>
Web: www.dkfz.de<http://www.dkfz.de>
------------------------------------------------------------------

------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to