[vtkusers] vtkStructuredPointsWriter writes a blank file
Bill Lorensen
bill.lorensen at gmail.com
Thu Jun 19 13:20:03 EDT 2014
The data extents you specified will produce a zero length structured points.
For the tiff reader, you need not specify the extents if you want all
of the data. And I'm not sure what the other methods will do in the
tiff reader.
vtkTIFFReader *TIFFReader = vtkTIFFReader::New();
TIFFReader -> SetFilePrefix("/Users/matheusviana/Desktop/images/im");
TIFFReader -> SetFilePattern("%s%04d.tif");
TIFFReader -> Update();
On Thu, Jun 19, 2014 at 8:14 AM, matheus_viana <vianamp at gmail.com> wrote:
> Guys, I'd like to know if there is any error in this code below. The code
> works fine for small size dataset, but it writes a blank file when the
> dataset has more than 2Gb. I'm working on 64bit OSX.
>
> Thanks a lot.
>
> int main() {
> vtkTIFFReader *TIFFReader = vtkTIFFReader::New();
> TIFFReader -> SetDataByteOrderToBigEndian();
> TIFFReader -> SetDataExtent(0,0,0,0,0,3959);
> TIFFReader -> SetFilePrefix("/Users/matheusviana/Desktop/images/im");
> TIFFReader -> SetFilePattern("%s%04d.tif");
> TIFFReader -> SetDataScalarTypeToUnsignedShort();
> TIFFReader -> Update();
>
> vtkStructuredPointsWriter *ImageDataWriter =
> vtkStructuredPointsWriter::New();
> ImageDataWriter -> SetFileType(VTK_BINARY);
> ImageDataWriter -> SetInput(TIFFReader -> GetOutput());
> ImageDataWriter -> SetFileName("Result.vtk");
> ImageDataWriter -> Write();
>
> return 1;
> }
>
>
>
> --
> View this message in context: http://vtk.1045678.n5.nabble.com/vtkStructuredPointsWriter-writes-a-blank-file-tp5727536.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> 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://public.kitware.com/mailman/listinfo/vtkusers
--
Unpaid intern in BillsBasement at noware dot com
More information about the vtkusers
mailing list