[ome-users] Compile BF-ITK-pipe on Windows

Joe Ping-Lin Hsiao phsiao at cs.unc.edu
Mon Apr 16 18:25:03 BST 2012


Hi Curtis,

> While we have not seen such compile errors per se, Windows support is
> definitely the least well tested. We have historically had a lot of
> difficulty getting the Bio-Formats ITK plugin (all three iterations of it,
> not just the pipes version) working in Windows at all. So it is not too
> surprising that it is not working for you now.

May I ask what develop environment you used on Windows? I got the same
errors from both Visual Studio 2008 and Mingw with Cygwin. I also
noticed that Bio-Formats website has 32bit BF-ITK binary for download.
I need a 64bit version so I can't use it, but it's still good to know
how it was built.

> If you do decide to investigate further and have any questions about it,
> please do not hesitate to ask!

I fixed those errors by using _pipe(), _write(), and _close() from
<io.h>. The library itself compiled fine. But when load images at run
time, I got this error:

\src\bioformats\components\native\bf-itk-pipe\itkBioFormatsImageIO.cxx:229:
BioFormatsImageIO: ITKReadImageInformation error:
The handle is invalid

The code before where this error happens is:

int m_Pipe[2];                                    // Declared in
BioFormatsImageIO.h by me.
...
_pipe( m_Pipe, 512, O_BINARY  ) // This is my Windows version of pipe()
m_Process = itksysProcess_New();
itksysProcess_SetCommand( m_Process, m_Argv );
itksysProcess_SetPipeNative( m_Process, itksysProcess_Pipe_STDIN,
(itksysProcess_Pipe_Handle*)m_Pipe );
itksysProcess_Execute( m_Process );

m_Pipe has '3' and '4' after the _pipe(), so I think they were setup
fine. Any idea?

Thanks,
Joe



More information about the ome-users mailing list