Hi Caspar!

I looked at the code of the PlanarFigureWriter and encountered a problem. The 
writer is designed to write one file with one extension, which I can see in the 
lines:

    virtual const char * GetDefaultFilename() { return "PlanarFigure.pf"; }
    virtual const char * GetFileDialogPattern() { return "Planar Figure Files 
(*.pf)"; }
    virtual const char * GetDefaultExtension() { return ".pf"; }

But Analyze uses two files with different extensions, img and hdr. How can I 
implement this?


Regards,
Martin



________________________________
 Von: "Goch, Caspar Jonas" <[email protected]>
An: 'Martin Tatzber' <[email protected]>; "Zelzer, Sascha" 
<[email protected]> 
CC: "[email protected]" <[email protected]> 
Gesendet: 11:42 Freitag, 21.Juni 2013
Betreff: AW: [mitk-users] user input dialog
 


Hi Martin,
 
I believe this is not quite the way Sascha intended the implementation. Usually 
FileWriters have no dependency on any Qmitk code (as you might want to write 
the files using MITK, but not Qt, see [1]).  If you want to look at an example 
implementation the Modules/PlanarFigure/IO/mitkPlanarFigureWriter.h implements 
a writer in this manner. Most file writers in the modules directory derive from 
the mitk::FileWriterWithInformation, if you are looking for more samples (or 
ones not implementing an XML writer).
 
I hope this helps,
Caspar
 
 
[1] http://docs.mitk.org/nightly-qt4/Architecture.html
 
Von:Martin Tatzber [mailto:[email protected]] 
Gesendet: Freitag, 21. Juni 2013 11:08
An: Zelzer, Sascha
Cc: [email protected]
Betreff: Re: [mitk-users] user input dialog
 
Hi Sascha!

I implemented it as a plugin, using the Plugin Generator. I have now a separate 
MITK project including this plugin.
At the moment, it is a button in the GUI, which a user can click to create 
Analyze files out of the selected image.

The class is a subclass of QmitkAbstractView.
 Does this do the trick if I just change the head of the class to

class DcmToAnalyze : public QmitkAbstractView, public 
mitk::FileWriterWithInformation

Regards,
Martin
 

________________________________

Von:Sascha Zelzer <[email protected]>
An: Martin Tatzber <[email protected]> 
CC: "[email protected]" <[email protected]> 
Gesendet: 13:46 Donnerstag, 20.Juni 2013
Betreff: Re: [mitk-users] user input dialog



Hi Martin,

Thanks for your offer to contribute your Analyze converter!

Could you elaborate a little on the way you implemented it? For a contribution, 
it would be ideal if your converter was written as a subclass of 
mitk::FileWriterWithInformation

http://docs.mitk.org/nightly-qt4/classmitk_1_1FileWriterWithInformation.html

which could then be integrated into the existing reader/writer framework and 
also solves the user input problem.

Best,
Sascha

On 06/17/2013 10:46 AM, Martin Tatzber wrote:
Hi guys!
> 
>I created a converter from DICOM to Analyze 7.5. At least it was designed as 
>this, but it can actually convert any image to Analyze 7.5. Anyway, I want to 
>contribute it.
> 
>But first, there is one thing that I want to make better: The destination path 
>is a fixed string in the source code. How can I make the user choose where to 
>save the Analyze files?
> 
>Regards,
>Martin
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to