I tried setting the origin to 490 but then the Z Boundary was 490+490*1.2 which was not correct either.
Now that I have an idea of what is going on I think I can make the necessary changes to the source code. Mike On Tue, Jul 7, 2009 at 12:50 PM, Burlen<[email protected]> wrote: > In so far as I understand, the origin is the location of the lower left > corner of the cell indexed at 0,0,0. You have requested extent 490-491, so > bounds should be: 0.0+490*1.2 to 0.0+491*1.2 or 588 to 589. > > > Mike Jackson wrote: >> >> I have a custom reader that I am updating and all is going well >> (thanks to all for help earlier) but I am having a problem >> understanding how some values are computed. >> >> When I load my data set and I look in the "Information" tab the X and >> Y boundaries are correct but the z boundary is not correct. In fact it >> is off by the z origin multiplied by the z spacing which I find odd >> because the X & Y origins are correct. Even if I set a z origin to >> Zero. >> >> Some output from my reader: >> >> MicronOriginVoi: 46979.1 48347.6 >> MicronSizeVoi: 1545.97 1731.28 >> CurrentScalingFactor: 0.207987 0.207987 1.2 >> PixelVOI: 0 7432 0 8322 490 491 >> PixelActual: 0 7440 0 8330 490 727 >> requestedExtent: 0 7432 0 8322 490 491 >> >> And I setup the vtkImageData like this: >> output->SetSpacing(this->CurrentScalingFactor); >> output->SetOrigin(this->MicronOriginVoi[0], this->MicronOriginVoi[1], 0.0 >> ); >> output->SetScalarType(VTK_TYPE_UINT8); >> output->SetExtent(requestedExtent); >> output->SetNumberOfScalarComponents( 1 ); >> output->AllocateScalars(); >> output->GetPointData()->GetScalars()->SetName("RoboMet Voxels"); >> output->GetPointData()->SetActiveScalars("RoboMet Voxels"); >> >> At this point the "Information" tab shows a Z Bounds of 588 to 589 >> (Delta 1.2). So the delta is correct but not the bounds. Also during >> the RequestInformation method I have the following code: >> >> double origin[3] = { this->MicronOriginVoi[0], this->MicronOriginVoi[1], >> 0.0 }; >> outInfo->Set( vtkDataObject::ORIGIN(), origin, 3 ); >> >> I am not really sure what I am doing wrong at this point. >> >> _________________________________________________________ >> Mike Jackson [email protected] >> BlueQuartz Software www.bluequartz.net _______________________________________________ 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 ParaView Wiki at: http://paraview.org/Wiki/ParaView Follow this link to subscribe/unsubscribe: http://www.paraview.org/mailman/listinfo/paraview
