Hi Ralf,
we fixed this issue today, please read the comments in bug 15480, which you can 
find here: http://bugs.mitk.org/show_bug.cgi?id=15480

Best regards
Sven

Von: Floca, Ralf Omar [mailto:[email protected]]
Gesendet: Donnerstag, 1. August 2013 11:31
An: '[email protected]'
Betreff: [mitk-users] Unable to save images

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 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to