VTK Reader

Hi,
I downloaded the 64-bit Paraview 5.9.0-RC3 from the official site.
My software doesn’t contain a Legacy VTK file reader.
What can be done to download the same?
Or is there any other reader that can read .vtk files in Para view?

Hi Nimish,

It does contains a .vtk file reader.
What error do you have ?

While opening the .vtk group of files, the software is asking me which reader should I use as it couldn’t find any reader for .vtk file.

I am trying to download a .zip file of the software and installing again to see if something was missed while installing it beforehand

Your .vtk file is probably malformed, please share it.

I will attach my .vtk file here.
Though the point being I could not see Legacy VTK Reader in the list provided by the software.
I have a group of .vtk files and none of them is opening.

Thanks & Regards

time_1.vtk (236 KB)

As I said, your file is malformed, here it is, corrected:

time_1.vtk (236.2 KB)

Thank you very much
What can i do in order to correct all my files?

I’ll share my matlab code with you here.
If you could, please suggest a fix in this

function write_vtk_grid_values(nx,ny,dx,dy,istep,data1)

format long

%-- open output file

fname = sprintf('time_%d.vtk',istep);
out = fopen(fname,'w');

nz = 1;

npoin = nx*ny*nz;
% start writing ASCII VTK file:
% header of VTK file
fprintf(out,'# vtk DataFileversion 2.0\n');
fprintf(out,'time_10.vtk\n');
fprintf(out,'ASCII\n');
fprintf(out,'DATASET STRUCTURED_GRID\n');

%--- coords of grid points:

fprintf(out,'DIMENSIONS %5d %5d%5d\n',nx,ny,nz);
fprintf(out,'POINTS %7d float\n',npoin);
for i = 1:nx
for j = 1:ny

x = (i-1)*dx;
y = (j-1)*dy;
z = 0.0;

fprintf(out, '%14.6e %14.6e%14.6e\n',x,y,z);

end
end

%--- write grid point values:

fprintf(out,'POINT_DATA %5d\n',npoin);

fprintf(out,'SCALARS CON float 1\n');

fprintf(out,'LOOKUP_TABLE default\n');
for i = 1:nx
for j = 1:ny
ii = (i-1)*nx+j;

fprintf(out,'%14.6e\n',data1(i,j));
end
end

fclose(out);
end %endfunction

Thanks & Regards

Should be

fprintf(out,'# vtk DataFile Version 2.0\n');

Thank you very much for all your help sir!

Thanks & Regards