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

Joe Ping-Lin Hsiao phsiao at cs.unc.edu
Wed May 2 18:13:44 BST 2012


I am glad to know it's working on your side as well. Looking forward
to seeing it integrate into the official release.

Thanks,
Joe

On Tue, May 1, 2012 at 6:58 PM, Curtis Rueden <ctrueden at wisc.edu> wrote:
> Hi Joe,
>
> Thank you very much for investigating, and sending a patch. We really
> appreciate it. In the meantime, I did some digging of my own and concluded
> that the previous code must never have worked correctly on Windows (unless
> using gcc via Cygwin for the POSIX functions). So your work is definitely
> valuable.
>
> Mark Hiner, one of the main BF-ITK developers, looked at your solution and
> says it seems to be working well, so we will integrate it into the official
> version shortly. However, I am traveling until next Monday, so it will be a
> little while before you hear back from me again. But we'll keep you posted!
>
> Thanks again,
> Curtis
>
>
>
> On Fri, Apr 27, 2012 at 5:47 PM, Joe Ping-Lin Hsiao <phsiao at cs.unc.edu>
> wrote:
>>
>> Curtis,
>>
>> I modified bf-itk-pipe source so that it compiles and works on Windows
>> 7 64bit. What I did was replacing Linux system calls to the ones that
>> work on Windows and fixing the code which depends on new line
>> characters  (Windows  uses '\r\n' instead of just '\n').
>>
>> All I changed is just one file: itkBioFormatsImageIO.cxx, and I have
>> attached the modified version. Search for '#ifdef WIN32' to see what
>> the modifications are.
>>
>> Thanks,
>> Joe
>>
>> On Mon, Apr 16, 2012 at 1:25 PM, Joe Ping-Lin Hsiao <phsiao at cs.unc.edu>
>> wrote:
>> > 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