I see. My case is different then.

After that I registered the NiftiImageIOFactory by
    itk::NiftiImageIOFactory::RegisterOneFactory();
I coul read and write images by the built-in mitk::ItkImageFileReader
and mitk::ItkImageFileWriter, respectively. (Even the series reader
works.)

I mean, this works through the API. Opening a 3D/3D+t image from the
GUI also works, the only thing is that I have to choose "all" instead
of "known extension" because the ".hdr" extension is not listed.

The bigger problem is saving via the datamanager view context menu.
Even if saving through API works, when I use the menu item then a
series of images is saved, and a warning is displayed about that.

I am afraid that this should be fixed in either the menu action or the
built-in object factories. I did not debug it, though.

Miklos

On Tue, Sep 6, 2011 at 11:14 PM, Clarkson, Matt <[email protected]> wrote:
> Hi Miklos,
>
> Using the documents here: http://www.mitk.org/wiki/BugSquashingSeminars, and 
> specifically the "Defining your own MITK Datatypes" it was quite easy to 
> create the necessary Factory classes to create a reader for a specific file 
> format, and to have the file extensions appear in the Load/Save dialog boxes.
>
> However, my problem was that I wanted to NOT use the standard ITK Analyze 
> reader, which meant replacing the mitkItkImageFileReader, and replace it with 
> a modified version.
> This turns out to be a bit trickier, as you would have to unregister the MITK 
> provided one, and provide your own.
>
> However, we could just ask for .img and .img.gz to be added to the file 
> dialog box (via mitkCoreObjectFactory.cpp), as this would probably suffice 
> for most people, and the image would be read using the standard 
> mitkImageFileReader.h
>
> Can you remind me again, why did you have to register a new Nifti file reader 
> when ITK and hence MITK already had one?
>
> Matt
>
>
>
>
>
>
> On 6 Sep 2011, at 17:09, Miklos Espak wrote:
>
>> Hi,
>>
>> if I save a 3D+t image through the GUI (datamanager view context
>> menu), a series of images is saved instead of a single image.
>>
>> I would like to use the Analyze format (.hdr + .img), it is not
>> offered by the save dialog, so I chose Nifti.
>>
>> I registered the itk::NiftiImageIOFactory, and from the sources I can
>> open and save 3D+t images properly. Is there a way to get around this?
>>
>> Matt!
>> Have you succeeded with adding hdr to the open/save dialog?
>>
>> Thanks,
>> Miklos
>>
>> ------------------------------------------------------------------------------
>> Special Offer -- Download ArcSight Logger for FREE!
>> Finally, a world-class log management solution at an even better
>> price-free! And you'll get a free "Love Thy Logs" t-shirt when you
>> download Logger. Secure your free ArcSight Logger TODAY!
>> http://p.sf.net/sfu/arcsisghtdev2dev
>> _______________________________________________
>> mitk-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/mitk-users
>
>

------------------------------------------------------------------------------
Using storage to extend the benefits of virtualization and iSCSI
Virtualization increases hardware utilization and delivers a new level of
agility. Learn what those decisions are and how to modernize your storage 
and backup environments for virtualization.
http://www.accelacomm.com/jaw/sfnl/114/51434361/
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to