Is there a way that I can pass a stream reference instead of a file reference to the ITK wrapped classes?<br><br>I
have a server written in Java which needs to process DICOM files. What
would be ideal would be for ITK to be invoked with a Java stream
instead of a File reference and for the output to be similarly returned
as a stream (so that it could be placed in an output HTTP stream). Is
there an exposed interface for doing this? I don&#39;t see one (but it
might be right in front of me and I&#39;ve missed it).
<br><br>Conceptually&nbsp; - something like this is what I&#39;m looking for:<br><br><div style="margin-left: 40px;">void processStream(InputStream in, OutputStream out){<br><br>&nbsp;&nbsp; itkImageFileReaderF2_Pointer reader = itkImageFileReaderF2.itkImageFileReaderF2_New


();<br>&nbsp;&nbsp; reader.setInputStream(in);<br><br>&nbsp; itkImageFileWriterUC2_Pointer writer = itkImageFileWriterUC2.itkImageFileWriterUC2_New();<br>&nbsp; writer.setOutputStream(out);<br>}<br><br></div>But
I don&#39;t know that the JNI interfaces for this could be nearly so clean.
Perhaps the NIO interfaces might have something that could be passed
via JNI to C++ - but it&#39;s been a while since I&#39;ve looked at this. <br><br>Alternatively - I guess I could have a process running the
ITK code which accepted socket connections and I could basically set up
my pipeline calling out to this process as a filter. <br><br>Finally -
I guess I could embed it in an Apache HTTPD server and do a HTTP
redirect - but putting things in Java so I can manage the IO streams
from Tomcat would fit in best with my current software.
<br><br>Some of the images are on the large size (20+MB) so I don&#39;t
want to deal with the latency of writing out to a file so that ITK can
read it in; some images are small so I don&#39;t want to launch an external
process for each image. <br><br>Suggestions welcomed. Thanks.<br><span class="sg"><span><br>Sean</span></span>