[Insight-users] Image index limits
Oleksandr Dzyubak
adzyubak at gmail.com
Tue Jan 12 20:44:09 EST 2010
Hi Robert,
I confirm that CVS version works much better than ITK-3.16
but still it looks like ImageFileReader has
an issue with Analyze75 format.
Regards,
Alex
Robert.Atwood at diamond.ac.uk wrote:
> Hi,
> I updated my copy of ITK at about 15:30 today (Jan 12 2010) and
> performed some tests.
>
> Note: I get the following warning from Alex's program:
>
> WARNING: In
> /dls_test/i12/robert/sources/ITK_cvs/Insight/Code/IO/itkAnalyzeImageIO.c
> xx, line 1307
> AnalyzeImageIO (0x8d25790): ERROR: Analyze 7.5 File Format Only Allows
> RPI, PIR, and RIP Orientation
>
> However it does not stop the execution of the program.
>
>
> Results:
>
> 1. Write cubes as .mhd, then run JustReadWrite using .mhd input and .mhd
> output: correct
> 2. Write cubes as .mhd, then run JustReadWrite using .mhd input and .hdr
> output: correct
> 3. Write cubes as .hdr, then run JustReadWrite using .hdr input and .hdr
> output: INCORRECT
> 4. Write cubes as .hdr, then run JustReadWrite using .hdr input and .mhd
> output: INCORRECT
>
> Conclusion:
> The problem lies in the reading of the .hdr format and is still present
> in the current CVS version. Writing of .hdr files seems unaffected.
>
>
> I suspect the problem lies here:
> 1
> /*======================================================================
> ===
> 2
> 3 Program: Insight Segmentation & Registration Toolkit
> 4 Module: $RCSfile: itkAnalyzeImageIO.cxx,v $
> 5 Language: C++
> 6 Date: $Date: 2009-12-23 20:15:06 $
> 7 Version: $Revision: 1.102 $
>
> ....
>
> 681 void AnalyzeImageIO::Read(void* buffer)
> 682 {
> 683 unsigned int dim;
> 684 const unsigned int dimensions = this->GetNumberOfDimensions();
> 685 unsigned int numberOfPixels = 1;
> //////<<<<<<<<<<<<<<<<<<<<<<<<<<<< UNSIGNED INT ????
> 686 for(dim=0; dim< dimensions; dim++ )
> 687 {
> 688 numberOfPixels *= m_Dimensions[ dim ];
> 689 }
>
>
>
>
> I hope this helps,
>
> Robert
>
>
>
>
>
>
>
>
> -----Original Message-----
> From: Bill Lorensen [mailto:bill.lorensen at gmail.com]
> Sent: 12 January 2010 17:25
> To: Oleksandr Dzyubak
> Cc: Atwood, Robert (DLSLtd,RAL,DIA); insight-users at itk.org;
> luis.ibanez at kitware.com
> Subject: Re: [Insight-users] Image index limits
>
> We have been making passes through the io's to add the proper types for
> offsets. etc.
>
> Try the cvs version and see if your test works with .mdh.
>
> Bill
>
> On Tue, Jan 12, 2010 at 11:42 AM, Oleksandr Dzyubak <adzyubak at gmail.com>
> wrote:
>
>> Hi Robert,
>>
>> Thanks for your help in studying this problem.
>>
>> Following your advise, I tested both
>>
>> ImageFill_Cube test.mhd
>> and
>> ImageFill_Cube test.hdr
>>
>> and in both images I see that
>> the first cube stays where it should but the second one disappeared!
>> The only reason for such different behavior on your and my machines I
>> can think of is that on my server I am using ITK 3.16 released on
>> September 15, 2009 vs your ITK CVS Nov 4, 2009.
>>
>> Does that mean that IOFactory was updated somehow between these two
>> releases?
>> Well, if it was, I have to give the CVS version a try.
>>
>> But anyway, according to your findings, this issue was not fixed in
>> ImageFileReader for all formats though (or, in particular, for
>> Analyze75 format), right?
>>
>> Unfortunately all my input images are in the Analyze75 format, thus
>> any conversion would still require the Analyze75 support in
>>
> ImageFileReader.
>
>> I see that we are getting close.
>>
>> Regards,
>>
>> Alex
>>
>> On Tue, Jan 12, 2010 at 6:06 AM, <Robert.Atwood at diamond.ac.uk> wrote:
>>
>>> Hi Kevin:
>>>
>>> Which image format did you use for your tests? I observed (see my
>>> other
>>> post) that problem using .hdr format (as described by Oleksander's
>>> original post) but not with .mhd format. I believe I observed a
>>> similar problem before with .tif stack but not with a series of .tif
>>> (or .mhd)
>>>
>>> Do you observe the problem if you use .hdr format?
>>>
>>> Thanks
>>>
>>> Robert
>>>
>>>
>>> -----Original Message-----
>>> From: insight-users-bounces at itk.org
>>> [mailto:insight-users-bounces at itk.org] On Behalf Of Kevin H. Hobbs
>>> Sent: 11 January 2010 15:01
>>> To: adzyubak at gmail.com
>>> Cc: insight-users at itk.org; Luis Ibanez
>>> Subject: Re: [Insight-users] Image index limits
>>>
>>> On 01/07/2010 05:28 PM, Oleksandr Dzyubak wrote:
>>>
>>>> ****** End JustReadWrite.cxx ***
>>>>
>>>>
>>> When I run this pair of programs I get two cubes in the output of the
>>>
>
>
>>> second program.
>>>
>>> I am using ITK from CVS on a 64 bit Linux workstation with 12
>>> gigabytes of RAM (bubbles.hooperlab on the dashboard).
>>>
>>> I tried running ImageCompare on the input and output images but the
>>> machine started swapping and I cancelled the comparison.
>>>
>>>
>>> --
>>> This e-mail and any attachments may contain confidential, copyright
>>> and or privileged material, and are for the use of the intended
>>> addressee only. If you are not the intended addressee or an
>>> authorised recipient of the addressee please notify us of receipt by
>>> returning the e-mail and do not use, copy, retain, distribute or
>>> disclose the information in or attached to the e-mail.
>>> Any opinions expressed within this e-mail are those of the individual
>>>
>
>
>>> and not necessarily of Diamond Light Source Ltd.
>>> Diamond Light Source Ltd. cannot guarantee that this e-mail or any
>>> attachments are free from viruses and we cannot accept liability for
>>> any damage which you may sustain as a result of software viruses
>>> which may be transmitted in or with the message.
>>> Diamond Light Source Limited (company no. 4375679). Registered in
>>> England and Wales with its registered office at Diamond House,
>>> Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE,
>>>
>
>
>>> United Kingdom
>>>
>>>
>>>
>>>
>>>
>> _____________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Kitware offers ITK Training Courses, for more information visit:
>> http://www.kitware.com/products/protraining.html
>>
>> Please keep messages on-topic and check the ITK FAQ at:
>> http://www.itk.org/Wiki/ITK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.itk.org/mailman/listinfo/insight-users
>>
>>
>>
>
>
More information about the Insight-users
mailing list