<span class="hb"><span name="Mark" class="g2"></span> </span><div class="ajy"><img class="ajz" id=":2ef" tabindex="0" src="https://mail.google.com/mail/u/0/images/cleardot.gif" alt=""></div><div id=":2d4" class="ii gt adP adO">
<div id=":2d5">Dear Mark,<br><br>Thanks for the clarification. My original problem remains unresolved. For example, in the LSM gist on lines 104-107:<div class="im"><br><pre><div> <span>ReaderType</span><span>::</span><span>Pointer</span> <span>reader</span> <span>=</span> <span>ReaderType</span><span>::</span><span>New</span><span>();</span></div>
<div> <span>reader</span><span>-></span><span>SetFileName</span><span>(</span><span>argv</span><span>[</span><span>1</span><span>]);</span></div>
<div> <span>reader</span><span>-></span><span>SetImageIO</span><span>(</span><span>io</span><span>);</span></div><div>
<span>reader</span><span>-></span><span>Update</span><span>();</span></div></pre><br></div>Here,
calling reader->Update() loads the entire image into memory. If you
have a very large LSM file (several gigabytes large), then this code
will fail since such an image cannot get into the memory. <br>
<br>Hence, I am trying to send the read region directly into the reader using<br><br>io->SetRegion(region);<br><br>and then <br><br>reader->SetImageIO(io);<br>reader->Update();<br><br><br>But this step is not giving me two different timepoints. It is writing out the same timepoint.<br>
<br>Kishore<div class="yj6qo ajU"><div id=":2eh" class="ajR" tabindex="0"><img class="ajT" src="https://mail.google.com/mail/u/0/images/cleardot.gif"><br><br><br></div></div></div></div><br><br><div class="gmail_quote">On Tue, Oct 16, 2012 at 2:13 PM, Mark Hiner <span dir="ltr"><<a href="mailto:hiner@wisc.edu" target="_blank">hiner@wisc.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello again,<br><br> I created a gist for your LSM test and updated it with my most recent code:<br><a href="https://gist.github.com/3900888" target="_blank">https://gist.github.com/3900888</a><br>
<br> That example is currently working for me, in that it writes out 2 images of 72 planes - one for T=0 and one for T=1. Since everything in ITK seems to be pipeline-oriented, I am not sure there is a solution to splitting out channels just using Setters like we were both trying.<br>
<br> Instead, I followed <a href="http://www.vtk.org/Wiki/ITK/Examples/ImageProcessing/RegionOfInterestImageFilter" target="_blank">this ROI Filter example</a> and used the logic from my last e-mail.<br><br> I do need to correct one thing I said in my last e-mail: SizeT should always be 1, as it is a relative offset to the Index value.<br>
<br> When I ran that test, both images went to grayscale.. I'm going to see if that's an error in the bf-itk-pipes logic, or just something that needs to be set up differently in using the ITK API.<br><br> Let me know if you run into any more problems with this code, or if you just want to discuss any part of it.<br>
<br>Thanks again for using our software :)<span class="HOEnZb"><font color="#888888"><br>- Mark</font></span><div class="HOEnZb"><div class="h5"><br><br><div class="gmail_quote">On Tue, Oct 16, 2012 at 11:00 AM, Mark Hiner <span dir="ltr"><<a href="mailto:hiner@wisc.edu" target="_blank">hiner@wisc.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Kishore,<br><br> I am sorry I wasn't able to get to your issue yesterday. Looking at it today, I think there are a couple of things going on here.<br>
<br> First of all: in your test class<br>- I consolidated a BioFormatsImageIO and the ImageIOBase.<br>
- In the region updating loop, the wrong region (dim-3 instead of dim-2) was being set, and only the index is set. I suspect both the index and size need to be set.<br><br> I attached an updated version of your test, where in the first iteration it sets IndexT = 0, sizeT = 1. The second iteration sets IndexT = 1, sizeT = 2. I believe those regions will split the time points as you wanted.<br>
<br>But there is a second issue: although the Reader IORegion is correct (I think) the Writer is not. It is defaulting to the ITK base 3D region. When I tried setting the Writer's region to our desired region, it throws an exception because the 5D region can't be contained by what it thinks is the largest possible (3D) region. I am refreshing myself on the ITK API and once we figure out how to set that region, I think it will write the images correctly (or we can move on to the next problem).<br>
<br>In your test I changed the output format to ome.tiff because I know that will use the itkBioFormatsImageIO writer code, which I know is capable of handling 5D writing.<br><br>Also, in testing I found a couple of bugs in the ITKPipesBridge code. I started a new branch to fix these and any other issues that may be discovered. If you want to use the itkBioFormatsImageIO writer code you'll have to use this new branch for now. You can find it here:<br>
<a href="https://github.com/hinerm/bioformats/commits/bf-itk-fixes" target="_blank">https://github.com/hinerm/bioformats/commits/bf-itk-fixes</a><br><br>As always, let me know if this isn't fully addressing your issue. Otherwise, I'll let you know as soon as I have the Writer region setting properly.<br>
<br>Thanks!<span><font color="#888888"><br>- Mark</font></span><div><div><br><br><div class="gmail_quote">On Fri, Oct 12, 2012 at 11:28 AM, Kishore Mosaliganti <span dir="ltr"><<a href="mailto:kishoreraom@gmail.com" target="_blank">kishoreraom@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Mark,<br><br>Thank you for the email and invaluable help. The bioformats-itk plugin is wonderful. I am attaching my script here to help you debug. Let me know if you have any questions on my script. I am starting with a 5D (XYZTC) image and trying to write out all the 3D timepoints for the first channel.<span><font color="#888888"><br>
<br>Kishore</font></span><div><div><br><br><div class="gmail_quote">On Fri, Oct 12, 2012 at 12:19 PM, Mark Hiner <span dir="ltr"><<a href="mailto:hinerm@gmail.com" target="_blank">hinerm@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Kishore,<br><br> I helped develop the bf-itk-pipe plugin and am investigating your issue right now. <br><br> What you're doing seems reasonable, so I'm trying to determine if there's a bug in the plugin. My goal is to have some working example code for you (and a fix if necessary) by the end of the day.<br>
<br>Thank you for using our plugin! I hope we can get it working for you soon.<br><br>- Mark<br><br><div class="gmail_quote"><div><div>On Fri, Oct 12, 2012 at 10:54 AM, Kishore Mosaliganti <span dir="ltr"><<a href="mailto:kishoreraom@gmail.com" target="_blank">kishoreraom@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>Dear ITK and OME users,<br><br>To further elaborate, I figured that this has nothing to do with the itkStreamingImageFilter.<br>
<br>Instead, the itkImageFileReader seems to be extracting the same image region although I update the requested region in the BioformatsImageIO class :;<br>
<br> itk::BioFormatsImageIO::Pointer io = itk::BioFormatsImageIO::New();<br> io->SetIORegion( region ); // doesn't make a difference in terms of image data extracted. Its always from the beginning.<br><br> ReaderType::Pointer reader = ReaderType::New();<br>
reader->SetFileName(argv[1]);<br> reader->SetImageIO(io);<br> reader->Update();<br><br>So, my general question is whether the BioformatsImageIO expects the whole LSM image to be loaded into memory before writing it out? I would like to specify small image regions since my LSM is too large to be fully loaded into memory. How else can I stream data from large LSM?<br>
<br>Thanks,<br><br>Kishore<br><br><br><div class="gmail_quote">On Fri, Oct 12, 2012 at 8:53 AM, Kishore Mosaliganti <span dir="ltr"><<a href="mailto:kishoreraom@gmail.com" target="_blank">kishoreraom@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br><br>I am trying to use bioformats and itk. I downloaded
and compiled bf-itk-pipe using cmake by linking against ITK 3.2:<br><br><a href="https://github.com/openmicroscopy/bioformats/tree/develop/components/native/bf-itk-pipe" target="_blank">https://github.com/openmicroscopy/bioformats/tree/develop/components/native/bf-itk-pipe</a><br>
<br><br>I tested out itkBFImageInfo
and ./itkRGBBioFormatsImageIOTest on a few simple LSM images. It works
great and writes out all the associated metadata and pixel data for the first timepoint. <br>
<br>My LSM microscopy image is 5D. It is X-Y-Z-Time-Channel. I am interested in extracting individual timepoints from the LSM file for processing. The filter seems to be using itkStreamingImageFilter. I set the NumberOfStreams
to 10 but that still seems to still write out only the first image. <br><br>How do I set the output requestion region for an individual timepoint?<br>
<br>Thank you,<br><br>Kishore
</blockquote></div><br>
<br></div></div>_______________________________________________<br>
ome-users mailing list<br>
<a href="mailto:ome-users@lists.openmicroscopy.org.uk" target="_blank">ome-users@lists.openmicroscopy.org.uk</a><br>
<a href="http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users" target="_blank">http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users</a><br>
<br></blockquote></div><br>
</blockquote></div><br>
</div></div></blockquote></div><br>
</div></div></blockquote></div><br>
</div></div></blockquote></div><br>