[vtkusers] Problem in loading big images using vtkimagereader

Michael Jackson mike.jackson at bluequartz.net
Wed Aug 11 09:31:10 EDT 2010


http://public.kitware.com/pipermail/paraview/2008-March/007422.html

Is when I came across the issue. I did not keep track of what the  
eventual "fixes" were but somewhere (probably a private email) I think  
it was said that a fix was difficult because the API for a lot of  
filters would need to be changed.
    In the most draconian fix the use of "long" should just be banned,  
but this would cause all sorts of backwards compatibility issues.
___________________________________________________________
Mike Jackson                      www.bluequartz.net


On Aug 11, 2010, at 8:57 AM, Jim Peterson wrote:

> All,
> Would this be a situation where the enthusiastic risk taking  
> programmer might copy some subset of vtk modules to the vtklocal  
> directory to make local modification for 64 bit windows builds? in  
> this case converting the 32bit integer file size fields to 64bit for  
> the affected file access modules in the windows builds.
>
> Does anyone have a starting list of affected modules to begin such a  
> task with?
>
> Thanks in advance.
> Jim
>
> Michael Jackson wrote:
>> Because vtkimagereader2 uses the "long" type for calculations in the
>> data extents and other places. On windows "long" evaluates to a 32  
>> bit
>> integer no matter how you compile it. On Linux and OS X which use the
>> LP64 model "long" will evaluate to a 64 bit integer. The added range
>> of the 64 bit integer allows the larger images to be loaded.
>>   For now you will have to find another way to load your images into
>> vtk until a fix is committed to vtk.
>>   These types of problems are not new to vtk as I have reported a few
>> in the past.
>>
>> -----
>> Mike Jackson                      www.bluequartz.net
>> Principal Software Engineer       mike.jackson at bluequartz.net
>> BlueQuartz Software               Dayton, Ohio
>>
>> On Aug 11, 2010, at 5:34, "Arunachalam Kana"
>> <Kana.Arunachalam at fh-wels.at> wrote:
>>
>>
>>> Hi Mike,
>>>
>>> I have tested the same code in linux system and it works. I am  
>>> able to load dataset >3Gb.
>>> I think your theory is right. Can you please explain why this  
>>> happens and how can i solve this problem to load large image data  
>>> set in windows system.
>>>
>>> Kana
>>>
>>> -----Original Message-----
>>> From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org]  
>>> On Behalf Of Arunachalam Kana
>>> Sent: 11 August 2010 10:00
>>> To: vtkusers at vtk.org
>>> Subject: Re: [vtkusers] Problem in loading big images using  
>>> vtkimagereader
>>>
>>> Hi Mike,
>>>
>>> I have not tried the code on linux OS, but going to try it now. I  
>>> would like to know your theory, which makes you think that  
>>> vtkimagereader2.cxx will work on linux 64 bit machine and not in  
>>> windows xp 64 bit machine. Which part of the code in  
>>> vtkimagereader2.cxx makes you to think this ?
>>>
>>> I would like to point out that, in our algorithms I was using  
>>> vtkmetaimagereader.cxx to read files. And I had no problem in  
>>> loading image >4Gb size in a windows xp 64 bit m/c. Is there a  
>>> difference between the vtkmetaimagereader.cxx and  
>>> vtkimagereader2.cxx ?
>>>
>>> Kana
>>>
>>> -----Original Message-----
>>> From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org]  
>>> On Behalf Of Michael Jackson
>>> Sent: 10 August 2010 19:42
>>> To: VTK Users
>>> Subject: Re: [vtkusers] Problem in loading big images using  
>>> vtkimagereader
>>>
>>> Are you able to run your code/data on a 64 bit Linux/OSX box to  
>>> see if
>>> it works there? I have a theory but it may be a bad theory based  
>>> off a
>>> very casual look at vtkImageReader2.cxx file
>>>
>>> Mike Jackson
>>>
>>> On Aug 10, 2010, at 1:27 PM, Arunachalam Kana wrote:
>>>
>>>
>>>> Hi Michael,
>>>>
>>>>   My system is a 64bit with windows xp. I used cmake to generate
>>>> visual studio project for
>>>> Vtk. I generated the projects using option "visual studio 9 2008
>>>> Win64". So i think the vtk libraries are also built for 64 bit
>>>> machine.
>>>>
>>>> Kana.
>>>>
>>>> -----Original Message-----
>>>> From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On
>>>> Behalf Of Michael Jackson
>>>> Sent: 10 August 2010 18:42
>>>> To: VTK Users
>>>> Subject: Re: [vtkusers] Problem in loading big images using
>>>> vtkimagereader
>>>>
>>>> Are you compiling VTK as a 64 bit set of libraries? Possibly sounds
>>>> like there is a 32/64 bit threshold being passed.
>>>>
>>>> ___________________________________________________________
>>>> Mike Jackson                      www.bluequartz.net
>>>> Principal Software Engineer       mike.jackson at bluequartz.net
>>>> BlueQuartz Software               Dayton, Ohio
>>>>
>>>> On Aug 10, 2010, at 11:51 AM, Arunachalam Kana wrote:
>>>>
>>>>
>>>>> Hi VtkUsers,
>>>>>
>>>>> I have problem in the vtkimagereader2. Following below is the code
>>>>> used to read image.
>>>>>
>>>>> vtkImageReader2 * reader = vtkImageReader2::New();
>>>>>              reader->SetFileName( file.toAscii().data() );
>>>>>              reader->SetDataScalarType( scalarType );
>>>>>              reader->SetHeaderSize( headersize );
>>>>>              reader->SetDataExtent( extent );
>>>>>              reader->SetDataSpacing( spacing );
>>>>>              reader->SetDataOrigin( origin );
>>>>>              reader->SetFileDimensionality( dim );
>>>>>              reader->UpdateWholeExtent();
>>>>>              reader->Update();
>>>>>
>>>>> The code works well when I read an image <= 3Gb(approx). But it  
>>>>> does
>>>>> not read the full
>>>>> Image if the image is >= 3Gb. The image data set i handle is >  
>>>>> 3Gb.
>>>>>
>>>>> I would like to have  some suggestion to use vtkimagereader and
>>>>> solve this problem.
>>>>>
>>>>> Thank you,
>>>>> Regards,
>>>>> Kana Arunachalam Kannappan
>>>>> Research Associate
>>>>> FH OÖ Forschungs & Entwicklungs GmbH
>>>>> Stelzhamer Strasse 23,
>>>>> 4600 Wels,
>>>>> Austria.
>>>>> Phone: +43 (0)7242 72811 -4420
>>>>> kana.arunachalam at fh-wels.at
>>>>> www.fh-ooe.at; www.3dct.at
>>>>>
>>>>> _______________________________________________
>>>>> Powered by www.kitware.com
>>>>>
>>>>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>>>>>
>>>>> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>>>>>
>>>>> Follow this link to subscribe/unsubscribe:
>>>>> http://www.vtk.org/mailman/listinfo/vtkusers
>>>>>
>>>> _______________________________________________
>>>> Powered by www.kitware.com
>>>>
>>>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>>>>
>>>> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>>>>
>>>> Follow this link to subscribe/unsubscribe:
>>>> http://www.vtk.org/mailman/listinfo/vtkusers
>>>>
>>> _______________________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>>>
>>> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.vtk.org/mailman/listinfo/vtkusers
>>> _______________________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>>>
>>> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.vtk.org/mailman/listinfo/vtkusers
>>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
>>
>>
>




More information about the vtkusers mailing list