vtkImageData* LayerImageBase::GetImage()
{
// return _image;
- return _imageChangeInformation->GetOutput();
+ vtkImageData *result;
+ if (_image==NULL)
+ {
+ result = NULL;
+ } else {
+ result = _imageChangeInformation->GetOutput();
+ }
+ return result;
}
//----------------------------------------------------------------------------
{
if ((_image!=NULL) && (_baseView!=NULL))
{
-double spc[3];
-GetImage()-> GetSpacing(spc);
-printf("EED LayerImageBase::onThreshold A img-spc %f %f %f\n", spc[0],spc[1],spc[2]);
double x=GetX();
double y=GetY();
double z=GetZ();
-// x = x*spc[0];
-// y = y*spc[1];
-// z = z*spc[2];
-
-
x = x*_spcBase[0];
y = y*_spcBase[1];
z = z*_spcBase[2];
-
CleanXYZ(x,y,z);
-
vtkCamera *camera = _baseView->GetRenderer()->GetActiveCamera();
int directionViewer=0;
if (camera->GetParallelProjection()==1)
directionViewer = wxvtk2dbasevie->GetDirection();
} // ParallelProjection
-
if (!GetActorPresent())
{
if (_thresholdTable==NULL)
// _scalarbarActor->SetTextPad(4); ??
-GetImage()-> GetSpacing(spc);
-printf("EED LayerImageBase::onThreshold B img-spc %f %f %f\n", spc[0],spc[1],spc[2]);
-
} // _image
}