<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 9.00.8112.16447"></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN
class=577372903-30072012>A follow up...</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN
class=577372903-30072012></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN
class=577372903-30072012>To build I changed the linking options
to:</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN
class=577372903-30072012>-lvtkCommonCore-6.0 -lvtkCommonDataModel-6.0
-lvtkIOCore-6.0 -lvtkIOXML-6.0 -lvtkRenderingCore-6.0</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2
face=Arial></FONT> </DIV>
<DIV dir=ltr align=left><SPAN class=577372903-30072012><FONT color=#0000ff
size=2 face=Arial>And the code to:</FONT></SPAN></DIV>
<DIV><FONT color=#0000ff size=2 face=Arial>
//writer->SetInputConnection(grid->GetProducerPort());<BR>
writer->SetHeaderTypeToUInt64();<BR>
writer->SetInputData(grid);</FONT></DIV><FONT color=#0000ff size=2
face=Arial></FONT>
<DIV><BR><SPAN class=577372903-30072012><FONT color=#0000ff size=2 face=Arial>I
can now write a large vtr file using VTK6 and have ParaView
3.14.1-1300-g0596919 read the file with no errors. However as the data gets
larger ParaView is more unstable. I found that I had to start using ParaView in
parallel to prevent seg faults. </FONT></SPAN></DIV>
<DIV><SPAN class=577372903-30072012><FONT color=#0000ff size=2
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=577372903-30072012><FONT color=#0000ff size=2 face=Arial>So it
is working thanks :)</FONT></SPAN></DIV>
<DIV><SPAN class=577372903-30072012><FONT color=#0000ff size=2
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=577372903-30072012><FONT color=#0000ff size=2
face=Arial>Paul</FONT></SPAN></DIV>
<DIV><SPAN class=577372903-30072012><FONT color=#0000ff size=2
face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr lang=en-us class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>From:</B> paraview-bounces@paraview.org
[mailto:paraview-bounces@paraview.org] <B>On Behalf Of </B>Paul
McIntosh<BR><B>Sent:</B> Sunday, 29 July 2012 10:12 AM<BR><B>To:</B> 'Andy
Bauer'<BR><B>Cc:</B> paraview@paraview.org<BR><B>Subject:</B> Re: [Paraview]
Large vtr files not read - The data array in theelement may be too
short<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV dir=ltr align=left><SPAN class=081171000-29072012><FONT color=#0000ff
size=2 face=Arial>Hi Andy,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=081171000-29072012><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=081171000-29072012><FONT color=#0000ff
size=2 face=Arial>Thanks - I am just trying to get my build working with the new
VTK 6 library system and if it works I'll post the updated
code.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=081171000-29072012><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=081171000-29072012><FONT color=#0000ff
size=2 face=Arial>Cheers,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=081171000-29072012><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=081171000-29072012><FONT color=#0000ff
size=2 face=Arial>Paul</FONT></SPAN></DIV><BR>
<DIV dir=ltr lang=en-us class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>From:</B> Andy Bauer [mailto:andy.bauer@kitware.com]
<BR><B>Sent:</B> Thursday, 26 July 2012 12:35 AM<BR><B>To:</B> Paul
McIntosh<BR><B>Cc:</B> paraview@paraview.org<BR><B>Subject:</B> Re: [Paraview]
Large vtr files not read - The data array in the element may be too
short<BR></FONT><BR></DIV>
<DIV></DIV>Hi,<BR><BR>If you're using VTK master to create your VTR files you
can use the SetHeaderTypeToUInt64() method to write out these large data sets.
ParaView master will be able to read them in properly. Unfortunately though this
has been fixed since the 3.14.1 release so it won't work there. We're working on
fixing this limitation properly for the next ParaView
release.<BR><BR>Andy<BR><BR>
<DIV class=gmail_quote>On Wed, Jul 25, 2012 at 3:47 AM, Paul McIntosh <SPAN
dir=ltr><<A href="mailto:paul.mcintosh@internetscooter.com"
target=_blank>paul.mcintosh@internetscooter.com</A>></SPAN> wrote:<BR>
<BLOCKQUOTE
style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex"
class=gmail_quote>Hi All,<BR><BR>How does one go about writing large
rectilinear data files (vtr) that are<BR>suitable for reading by
ParaView?<BR><BR>I have been trying using VTK and found that there is a size
limit(?).<BR>Googling showed that there was a bug in 2005 that should have
been fixed but<BR>I am still getting an error when I go above a certain size
(even with 3.14<BR>64bit precompiled). I have adapted a VTK example and
reproduced the problem<BR>- below is the error message followed by the code.
"size = 1000" works,<BR>"size = 1200" produced the error message, "size =
2000" ParaView just<BR>segfaults.<BR><BR>Do I have to change it to use
parallel writers?<BR><BR>Cheers,<BR><BR>Paul<BR>---<BR><A
href="http://www.internetscooter.com"
target=_blank>www.internetscooter.com</A><BR><BR>ERROR:
In<BR>/usr/local/src/PARAVIEW/3.14.0/ParaView-3.14.0-Source/VTK/IO/vtkXMLStructure<BR>dDataReader.cxx,
line 325<BR>vtkXMLRectilinearGridReader (0x1b2b54b0): Error reading extent 0
1199 0 1199<BR>0 1199 from piece 0<BR><BR><BR>ERROR:
In<BR>/usr/local/src/PARAVIEW/3.14.0/ParaView-3.14.0-Source/VTK/IO/vtkXMLDataReade<BR>r.cxx,
line 510<BR>vtkXMLRectilinearGridReader (0x1b2b54b0): Cannot read point data
array "Da"<BR>from PointData in piece 0. The data array in the element
may be too short.<BR><BR><BR>ERROR:
In<BR>/usr/local/src/PARAVIEW/3.14.0/ParaView-3.14.0-Source/VTK/IO/vtkXMLStructure<BR>dDataReader.cxx,
line 325<BR>vtkXMLRectilinearGridReader (0x1b2b54b0): Error reading extent 0
1199 0 1199<BR>0 1199 from piece 0<BR><BR><BR>ERROR:
In<BR>/usr/local/src/PARAVIEW/3.14.0/ParaView-3.14.0-Source/VTK/IO/vtkXMLDataReade<BR>r.cxx,
line 510<BR>vtkXMLRectilinearGridReader (0x1b2b54b0): Cannot read point data
array "Da"<BR>from PointData in piece 0. The data array in the element
may be too short.<BR><BR><BR>ERROR:
In<BR>/usr/local/src/PARAVIEW/3.14.0/ParaView-3.14.0-Source/VTK/IO/vtkXMLStructure<BR>dDataReader.cxx,
line 325<BR>vtkXMLRectilinearGridReader (0x1b2b54b0): Error reading extent 0
1199 0 1199<BR>0 1199 from piece 0<BR><BR><BR>ERROR:
In<BR>/usr/local/src/PARAVIEW/3.14.0/ParaView-3.14.0-Source/VTK/IO/vtkXMLDataReade<BR>r.cxx,
line 510<BR>vtkXMLRectilinearGridReader (0x1b2b54b0): Cannot read point data
array "Da"<BR>from PointData in piece 0. The data array in the element
may be too short.<BR><BR><BR>ERROR:
In<BR>/usr/local/src/PARAVIEW/3.14.0/ParaView-3.14.0-Source/VTK/IO/vtkXMLStructure<BR>dDataReader.cxx,
line 325<BR>vtkXMLRectilinearGridReader (0x1b2b54b0): Error reading extent 0
1199 0 1199<BR>0 1199 from piece 0<BR><BR><BR>ERROR:
In<BR>/usr/local/src/PARAVIEW/3.14.0/ParaView-3.14.0-Source/VTK/IO/vtkXMLDataReade<BR>r.cxx,
line 510<BR>vtkXMLRectilinearGridReader (0x1b2b54b0): Cannot read point data
array "Da"<BR>from PointData in piece 0. The data array in the element
may be too short.<BR><BR>// Qt (used for other code - not relevant
here)<BR>#include <QCoreApplication><BR>#include
<QtEndian><BR>#include <QDebug><BR>#include
<QStringList><BR><BR>// C++<BR>#include <list><BR>#include
<iostream><BR>#include <fstream><BR>using namespace std;<BR><BR>//
VTK<BR>#include <vtkVersion.h><BR>#include
<vtkSmartPointer.h><BR>#include <vtkDoubleArray.h><BR>#include
<vtkFloatArray.h><BR>#include <vtkPointData.h><BR>#include
<vtkCellData.h><BR>#include <vtkStructuredGrid.h><BR>#include
<vtkRectilinearGrid.h><BR>#include
<vtkXMLRectilinearGridWriter.h><BR>#include
<vtkDataSetMapper.h><BR>#include
<vtkXMLStructuredGridWriter.h><BR>#include
<vtkXMLRectilinearGridReader.h><BR>#include
<vtkSmartPointer.h><BR>#include <vtkProperty.h><BR>#include
<vtkDataSetMapper.h><BR>#include
<vtkXMLRectilinearGridReader.h><BR>#include
<vtkRectilinearGridGeometryFilter.h><BR>#include
<vtkRenderWindow.h><BR>#include
<vtkRenderWindowInteractor.h><BR>#include
<vtkRenderer.h><BR><BR>#include <vtkDataSetMapper.h><BR>#include
<vtkActor.h><BR>#include <vtkRenderWindow.h><BR>#include
<vtkRenderer.h><BR>#include
<vtkRenderWindowInteractor.h><BR><BR><BR>int main(int, char
*[])<BR>{<BR> long int size = 1200;<BR> // Create a grid<BR>
vtkSmartPointer<vtkRectilinearGrid> grid
=<BR>vtkSmartPointer<vtkRectilinearGrid>::New();<BR><BR>
grid->SetDimensions(size,size,size);<BR><BR>
vtkSmartPointer<vtkDoubleArray> xArray
=<BR>vtkSmartPointer<vtkDoubleArray>::New();<BR>
xArray->SetNumberOfComponents(1);<BR>
vtkSmartPointer<vtkDoubleArray> yArray
=<BR>vtkSmartPointer<vtkDoubleArray>::New();<BR>
yArray->SetNumberOfComponents(1);<BR>
vtkSmartPointer<vtkDoubleArray> zArray
=<BR>vtkSmartPointer<vtkDoubleArray>::New();<BR>
zArray->SetNumberOfComponents(1);<BR><BR> // Container for
data<BR> vtkSmartPointer<vtkFloatArray> DaArray
=<BR>vtkSmartPointer<vtkFloatArray>::New();<BR>
DaArray->SetNumberOfComponents(1);<BR>
DaArray->SetName("Da");<BR><BR> for (long int i = 0; i < size;
i++)<BR> {<BR>
xArray->InsertNextValue(i);<BR>
yArray->InsertNextValue(i);<BR>
zArray->InsertNextValue(i);<BR> }<BR><BR>
grid->SetXCoordinates(xArray);<BR>
grid->SetYCoordinates(yArray);<BR>
grid->SetZCoordinates(zArray);<BR><BR> for (long int i = 0; i <
size*size*size; i++)<BR> {<BR>
DaArray->InsertNextValue(i);<BR> }<BR>
grid->GetPointData()->SetScalars(DaArray);<BR><BR> std::cout
<< "There are " << grid->GetNumberOfPoints()<BR>
<< " points." << std::endl;<BR>
std::cout << "There are " << grid->GetNumberOfCells()<BR>
<< " cells." <<
std::endl;<BR><BR> vtkSmartPointer<vtkXMLRectilinearGridWriter>
writer
=<BR>vtkSmartPointer<vtkXMLRectilinearGridWriter>::New();<BR>
//writer->SetFileName("rectilineargrid.vtr");<BR>
writer->SetFileName("test.vtr");<BR>
writer->SetInputConnection(grid->GetProducerPort());<BR> cout
<< "Writing " << "test.vtr" << "..." <<
endl;<BR> writer->Write();<BR> cout << "Wrote!" <<
endl;<BR><BR> // Create a mapper and actor<BR>
vtkSmartPointer<vtkDataSetMapper> mapper
=<BR>vtkSmartPointer<vtkDataSetMapper>::New();<BR>
mapper->SetInputConnection(grid->GetProducerPort());<BR><BR>
vtkSmartPointer<vtkActor> actor =
vtkSmartPointer<vtkActor>::New();<BR>
actor->SetMapper(mapper);<BR><BR> // Visualize<BR>
vtkSmartPointer<vtkRenderer> renderer
=<BR>vtkSmartPointer<vtkRenderer>::New();<BR>
vtkSmartPointer<vtkRenderWindow> renderWindow
=<BR>vtkSmartPointer<vtkRenderWindow>::New();<BR>
renderWindow->AddRenderer(renderer);<BR>
vtkSmartPointer<vtkRenderWindowInteractor> renderWindowInteractor
=<BR>vtkSmartPointer<vtkRenderWindowInteractor>::New();<BR>
renderWindowInteractor->SetRenderWindow(renderWindow);<BR><BR>
renderer->AddActor(actor);<BR> renderer->SetBackground(.3, .6,
.3); // Background color green<BR><BR>
renderWindow->Render();<BR>
renderWindowInteractor->Start();<BR><BR> return
EXIT_SUCCESS;<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 <A href="http://www.kitware.com/opensource/opensource.html"
target=_blank>http://www.kitware.com/opensource/opensource.html</A><BR><BR>Please
keep messages on-topic and check the ParaView Wiki at: <A
href="http://paraview.org/Wiki/ParaView"
target=_blank>http://paraview.org/Wiki/ParaView</A><BR><BR>Follow this link to
subscribe/unsubscribe:<BR><A
href="http://www.paraview.org/mailman/listinfo/paraview"
target=_blank>http://www.paraview.org/mailman/listinfo/paraview</A><BR></BLOCKQUOTE></DIV><BR></BODY></HTML>