[vtkusers] vtkImageData -> SetOrigin
    Thomas Deschamps 
    tdeschamps at lbl.gov
       
    Fri Nov 22 18:36:55 EST 2002
    
    
  
Hello vtkUsers
I have a problem with SetOrigin method in vtkImageData.
If I have two vtkImageData * myImageData and myOtherImageData,
myOtherImageData -> DeepCopy( myImageData );
 vtkExtractVOI * tmpVOI = vtkExtractVOI::New();
 tmpVOI -> SetInput(myImageData);
 tmpVOI -> SetVOI(extent);
 tmpVOI -> Update();
 myOtherImageData -> DeepCopy( tmpVOI -> GetOutput() );
 myOtherImage -> SetOrigin( 0,0,0 );
and I write it in a file with
 vtkStructuredPointsWriter *writer = vtkStructuredPointsWriter::New();
 writer -> SetInput( myOtherImageData );
 writer -> SetFileName( "toto.vtk" );
 writer -> SetFileTypeToBinary();
 writer -> Update();
Then the file quoted origin is
 > more toto.vtk
...
ORIGIN 33.3 0 14
...
I do not understand why it is not 0 0 0
Thanks for your help.
Thomas (TDeschamps at lbl.gov)
    
    
More information about the vtkusers
mailing list