[Insight-developers] Custom header format
Dženan Zukić
dzenanz at gmail.com
Fri May 15 10:29:43 EDT 2009
Thank you very much, that was what I was looking for.
itk::ObjectFactoryBase::RegisterFactory( itk::DatImageIOFactory::New() );
//this did it for me
Best regards,
Dženan
2009/5/15 Bradley Lowekamp <blowekamp at mail.nih.gov>
> I don't know about your error messages, but to register your format so that
> you don't have to explicitly set the IO in a reader or writer you can use
> the following:
>
> http://www.vtk.org/Wiki/Plugin_IO_mechanisms
>
> On May 15, 2009, at 4:10 AM, Dženan Zukić wrote:
>
> Hi all!
>
> I need to work with a custom 3D image file format. Format is very
> simple, and I have started implementing it.
>
> I copied itkNrrdImageIO.cxx, and accompanying header and factory
> files, renamed everything to from Nrrd to Dat (including the supported
> extension). I also added these files to CMakeLists.txt in Code\IO
> folder. I have put something like:
>
> std::ofstream debug("D:\\debug.txt");
> debug<<"ReadImageInformation()";
> debug.close();
>
> in every function in itkDatImageIO.cxx, but this never gets executed.
> When executed without debugging I get error:
>
> This application has requested the Runtime to terminate it in an unusual
> way.
> Please contact the application's support team for more information.
>
> When executed with debugging I get:
>
> Unhandled exception at 0x7c812afb in MyProgram.exe: Microsoft C++
> exception: itk::ImageFileReaderException at memory location
> 0x013af020..
>
> That is a line 164 "InterlockedIncrement(&m_ReferenceCount);" in
> itkLightObject.cxx
>
> Where else do I have to "register" my new image format?
>
> Thanks for help,
> Dženan Zukić
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-developers
>
>
> ========================================================
>
> Bradley Lowekamp
>
> Lockheed Martin Contractor for
>
> Office of High Performance Computing and Communications
>
> National Library of Medicine
>
> blowekamp at mail.nih.gov
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20090515/26d4b534/attachment.htm>
More information about the Insight-developers
mailing list