[vtkusers] PVTI not Parallel

Kevin H. Hobbs hobbsk at ohiou.edu
Wed Sep 27 18:36:35 EDT 2006


I just checked my little vtkXMLPImageDataWriter test program ( pasted
below ) with the VTK release 5.0.2 instead of against CVS. It also loads
the whole image to write the tiny piece.

Am I using vtkXMLPImageDataWriter wrong? 



#include "vtkXMLImageDataReader.h"

#include "vtkExtentTranslator.h"

#include "vtkXMLPImageDataWriter.h"

int main( void )
{

        char in_file_name[] =
"../stomach_sections/Sep_20_2006/byte_vol.vti";
        char out_file_name[] = "out.pvti";
        int pieces = 2048;
        int start_piece = 0;
        int end_piece = 0;

        vtkXMLImageDataReader * reader
                = vtkXMLImageDataReader::New();
        reader->SetFileName( in_file_name );

        vtkXMLPImageDataWriter * pimage_writer
                = vtkXMLPImageDataWriter::New();

        pimage_writer->DebugOn();

        vtkExtentTranslator * ext_trans
                = pimage_writer->GetExtentTranslator();

        ext_trans->DebugOn();

        pimage_writer->SetFileName(out_file_name );
        pimage_writer->SetNumberOfPieces( pieces );
        pimage_writer->SetStartPiece( start_piece );
        pimage_writer->SetEndPiece( end_piece );
        pimage_writer->SetInputConnection(
                        reader->GetOutputPort() );
        pimage_writer->Update();

        return 0;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060927/831ab528/attachment.pgp>


More information about the vtkusers mailing list