<div class="gmail_quote">Hi Jesse,<br><div class="gmail_quote"><div><br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">The reader works
beautifully - I can't thank you enough.<br></blockquote><div><br></div></div>Great that you found a working solution. Nonetheless, for completeness in the list archive, I wanted to follow up on what Alex said:<br><br>
On Mon, Feb 15, 2010 at 10:46 AM, Alexandre
GOUAILLARD <span dir="ltr"><<a href="mailto:agouaillard@gmail.com">agouaillard@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
As dan pointed out, the best reader, or the one including most<br>
functionaity and the most up to date, out there might be the one from<br>
OME, and curtis should have a wrapping between OME and ITK IO working<br>
(in cc).<br></blockquote><div><br>There is indeed a preliminary version of an ITK ImageIO plugin that uses Bio-Formats (<a href="http://loci.wisc.edu/software/bio-formats">http://loci.wisc.edu/software/bio-formats</a>), which includes support for LSM among many other life sciences formats.<br>
<br>Right now the documentation is limited, but you can find build instructions at:<br> <a href="http://www.farsight-toolkit.org/wiki/FARSIGHT_Tutorials/Building_Software/Bio-Formats/Building_ITK_Plugin">http://www.farsight-toolkit.org/wiki/FARSIGHT_Tutorials/Building_Software/Bio-Formats/Building_ITK_Plugin</a><br>
<br>The license for the plugin is BSD, but the license for Bio-Formats itself (Java code) is GPL, so please keep that in mind if you are planning to distribute the JAR file with your application.<br><br>In the future, this page on our site will have more details on the plugin:<br>
<a href="http://www.loci.wisc.edu/bio-formats/itk">http://www.loci.wisc.edu/bio-formats/itk</a><br></div></div><br>Feel free to contact the Bio-Formats team (<a href="http://loci.wisc.edu/software/mailing-lists">http://loci.wisc.edu/software/mailing-lists</a>) with any questions or problems!<br>
<br>-Curtis<br><br><div class="gmail_quote">On Tue, Feb 16, 2010 at 10:11 PM, Jesse Stokum <span dir="ltr"><<a href="mailto:jessestokum@gmail.com">jessestokum@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
The reader works beautifully - I can't thank you enough.<br>
<font color="#888888"><br>
Jesse<br>
</font><div><div></div><div class="h5"><br>
On Mon, Feb 15, 2010 at 5:47 PM, Luis Ibanez <<a href="mailto:luis.ibanez@kitware.com">luis.ibanez@kitware.com</a>> wrote:<br>
> Hi Alex,<br>
><br>
> Thanks for the reminder.<br>
><br>
><br>
> Jesse:<br>
><br>
> You may want to look at bioimageXD<br>
> if you don't mind using GPL code:<br>
> <a href="http://www.bioimagexd.net/index.php?option=com_content&task=view&id=14&Itemid=28" target="_blank">http://www.bioimagexd.net/index.php?option=com_content&task=view&id=14&Itemid=28</a><br>
><br>
><br>
> Otherwise,<br>
> you probably could use the vtkLSMReader<br>
> in gofigure2, that is under a BSD license,<br>
> as Alex pointed out.<br>
><br>
><br>
><br>
> Regards,<br>
><br>
><br>
> Luis<br>
><br>
><br>
> -------------------------------------------------------<br>
> On Mon, Feb 15, 2010 at 11:46 AM, Alexandre GOUAILLARD<br>
> <<a href="mailto:agouaillard@gmail.com">agouaillard@gmail.com</a>> wrote:<br>
>> hi luis, dan, all,<br>
>><br>
>> luis, you might not remember that long thread we had about LSM reader,<br>
>> but the ITK one does not handle multi channels.<br>
>><br>
>> Dan (and other from bioimageXD) made their vtkLSM reader available<br>
>> under BSD, and that s the one we eventually used for GoFigure. That<br>
>> the one gaethan is also using on a daily basis.<br>
>><br>
>> As dan pointed out, the best reader, or the one including most<br>
>> functionaity and the most up to date, out there might be the one from<br>
>> OME, and curtis should have a wrapping between OME and ITK IO working<br>
>> (in cc).<br>
>><br>
>> good luck.<br>
>><br>
>> alex.<br>
>><br>
>> On Sun, Feb 14, 2010 at 5:21 AM, Jesse Stokum <<a href="mailto:jessestokum@gmail.com">jessestokum@gmail.com</a>> wrote:<br>
>>> Luis,<br>
>>><br>
>>> I've surrounded my reader->update() line with a try, catch block that<br>
>>> catches itk::ExceptionObject. It doesn't seem to be even getting to<br>
>>> the catch block- simple std::cout statements inside the catch block<br>
>>> are not showing. The following unhandled exception appears however<br>
>>> when I run my program on the vs debugger:<br>
>>><br>
>>> The thread 'Win32 Thread' (0x1a7c) has exited with code 0 (0x0).<br>
>>> Unhandled exception at 0x00b0a890 in CellSegment.exe: 0xC0000005:<br>
>>> Access violation writing location 0x08fc0040.<br>
>>><br>
>>> The breakpoint that is detected by vs is in line 1116 of the class<br>
>>> itkTIFFImageIO.cxx.<br>
>>><br>
>>> Thanks,<br>
>>><br>
>>> Jesse<br>
>>><br>
>>><br>
>>><br>
>>> On Sat, Feb 13, 2010 at 3:38 PM, Luis Ibanez <<a href="mailto:luis.ibanez@kitware.com">luis.ibanez@kitware.com</a>> wrote:<br>
>>>> Hi Jesse,<br>
>>>><br>
>>>> Thanks for the clarification.<br>
>>>><br>
>>>> You are right, if the 3D image is in a single file, then<br>
>>>> using the ImageFileReader is the correct way to<br>
>>>> proceed.<br>
>>>><br>
>>>> Could you please post to the list the exact text<br>
>>>> that you get from the Exceptions ?<br>
>>>><br>
>>>> If you need examples on how to catch exceptions<br>
>>>> and print their error messages, you will find many<br>
>>>> of them in the directories under<br>
>>>><br>
>>>> Insight/Examples<br>
>>>><br>
>>>><br>
>>>> Thanks<br>
>>>><br>
>>>><br>
>>>> Luis<br>
>>>><br>
>>>><br>
>>>> -----------------------------------------------------------------<br>
>>>> On Sat, Feb 13, 2010 at 12:33 PM, Jesse Stokum <<a href="mailto:jessestokum@gmail.com">jessestokum@gmail.com</a>> wrote:<br>
>>>>> Luis,<br>
>>>>><br>
>>>>> Thanks for the quick reply, I really appreciate it. The lsm image<br>
>>>>> stack that I'm working with are actually all in a single file - which<br>
>>>>> is why I hesitated to use the ImageSeriesReader for this one. I<br>
>>>>> suppose I could always split the stack into a series of slices imagej<br>
>>>>> or something else, but it would be more time efficient to just read in<br>
>>>>> the entire file. Also, intuitively I think that I would get better<br>
>>>>> filtering results if I handled it as a 3d image, though I could be<br>
>>>>> wrong about that. Thanks!<br>
>>>>><br>
>>>>> Jesse<br>
>>>>><br>
>>>>> On Fri, Feb 12, 2010 at 5:07 PM, Luis Ibanez <<a href="mailto:luis.ibanez@kitware.com">luis.ibanez@kitware.com</a>> wrote:<br>
>>>>>> Hi Jesse,<br>
>>>>>><br>
>>>>>><br>
>>>>>> If you have the images in independent files (one file per slice),<br>
>>>>>> you should use the itk::ImageSeriesReader (instead of the<br>
>>>>>> itk::ImageFileReader).<br>
>>>>>><br>
>>>>>><br>
>>>>>> The LSM reader in ITK should be able to manage three channels<br>
>>>>>> (three components per pixel).<br>
>>>>>><br>
>>>>>> You will find examples on how to use the ImageSeriesReader<br>
>>>>>> in the ITK Software Guide<br>
>>>>>><br>
>>>>>> <a href="http://www.itk.org/ItkSoftwareGuide.pdf" target="_blank">http://www.itk.org/ItkSoftwareGuide.pdf</a><br>
>>>>>><br>
>>>>>> in the chapter "Reading and Writing Images",<br>
>>>>>><br>
>>>>>> and you will find source code examples in the directory:<br>
>>>>>><br>
>>>>>> Insight/Examples/IO<br>
>>>>>><br>
>>>>>> in particular, you may find interesting the example:<br>
>>>>>><br>
>>>>>> RGBImageSeriesReadWrite.cxx<br>
>>>>>><br>
>>>>>> you probably only need to replace there the PNGImageIO<br>
>>>>>> class with a LSMImageIO class.<br>
>>>>>><br>
>>>>>><br>
>>>>>> Please give it a try and let us know if you find any problems.<br>
>>>>>><br>
>>>>>> BTW: I you get any Exceptions, please post to the list<br>
>>>>>> the *exact* error message that you get from the exception.<br>
>>>>>><br>
>>>>>><br>
>>>>>> Thanks<br>
>>>>>><br>
>>>>>><br>
>>>>>><br>
>>>>>> Luis<br>
>>>>>><br>
>>>>>><br>
>>>>>><br>
>>>>>> -------------------------------------------------------------------------------------<br>
>>>>>> On Fri, Feb 12, 2010 at 12:34 PM, Jesse Stokum <<a href="mailto:jessestokum@gmail.com">jessestokum@gmail.com</a>> wrote:<br>
>>>>>>> I'm trying to use ITK's ImageFileReader to read in LSM format images<br>
>>>>>>> and my code is abruptly throwing exceptions. The images are three<br>
>>>>>>> channel, and are ~30 slices. Should I consider them 3d images? Here's<br>
>>>>>>> the code in my main() I've been trying:<br>
>>>>>>><br>
>>>>>>> typedef itk::RGBPixel<unsigned char> PixelType;<br>
>>>>>>> typedef itk::Image<PixelType, 3> ImageType;<br>
>>>>>>><br>
>>>>>>> typedef itk::ImageFileReader<ImageType> ReaderType;<br>
>>>>>>> typedef itk::LSMImageIO ImageIOType;<br>
>>>>>>> typedef itk::ImageFileWriter<ImageType> WriterType;<br>
>>>>>>><br>
>>>>>>> ReaderType::Pointer reader = ReaderType::New();<br>
>>>>>>> ImageIOType::Pointer lsmImageIO = ImageIOType::New();<br>
>>>>>>> reader->SetImageIO(lsmImageIO);<br>
>>>>>>> reader->SetFileName("Tests.lsm");<br>
>>>>>>><br>
>>>>>>> Are lsm pixels vector pixels? I guess I'm just unsure how to handle<br>
>>>>>>> this situation. Thanks in advance!<br>
>>>>>>> _____________________________________<br>
>>>>>>> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>>>>>>><br>
>>>>>>> Visit other Kitware open-source projects at<br>
>>>>>>> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
>>>>>>><br>
>>>>>>> Kitware offers ITK Training Courses, for more information visit:<br>
>>>>>>> <a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
>>>>>>><br>
>>>>>>> Please keep messages on-topic and check the ITK FAQ at:<br>
>>>>>>> <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
>>>>>>><br>
>>>>>>> Follow this link to subscribe/unsubscribe:<br>
>>>>>>> <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
>>>>>>><br>
>>>>>><br>
>>>>><br>
>>>><br>
>>> _____________________________________<br>
>>> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>>><br>
>>> Visit other Kitware open-source projects at<br>
>>> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
>>><br>
>>> Kitware offers ITK Training Courses, for more information visit:<br>
>>> <a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
>>><br>
>>> Please keep messages on-topic and check the ITK FAQ at:<br>
>>> <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
>>><br>
>>> Follow this link to subscribe/unsubscribe:<br>
>>> <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
>>><br>
>><br>
><br>
_____________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
</div></div></blockquote></div><br>