// maxZ=dim[2];
int ext[6];
- _marImageData->GetImageData()->GetWholeExtent(ext);
- maxZ=ext[5]-ext[4]+1;
+ vtkImageData* img = _marImageData->GetImageData();
+ if(img!=NULL){
+ img->GetWholeExtent(ext);
+ maxZ=ext[5]-ext[4]+1;
- if (z>=maxZ)
- {
- z=maxZ-1;
- }
- if (z<=0)
- {
- z=0;
- }
+ if (z>=maxZ)
+ {
+ z=maxZ-1;
+ }
+ if (z<=0)
+ {
+ z=0;
+ }
- _z=z;
+ _z=z;
+ }
}
//-------------------------------------------------------------------
double vtkBaseData::GetZ()
{
t=0;
}
- _t=t;
+ _t=(int)t;
}
//-------------------------------------------------------------------
//-------------------------------------------------------------------
void vtkMPRBaseData::Configure()
{
- _marImageData->GetImageData()->GetExtent (_x1,_x2,_y1,_y2,_z1,_z2);
- _transformOrientation=vtkTransform::New();
- _transformOrientation->Identity();
+ vtkImageData* img = _marImageData->GetImageData();
+ if(img !=NULL){
+ img->GetExtent (_x1,_x2,_y1,_y2,_z1,_z2);
+ _transformOrientation=vtkTransform::New();
+ _transformOrientation->Identity();
+ }
}
//-------------------------------------------------------------------
void vtkMPRBaseData::GetDimensionExtention(int *x1,int *x2,int *y1,int *y2,int *z1,int *z2)
void vtkMPRBaseData::SetX(double x)
{
int dim[3];
- _marImageData->GetImageData()->GetDimensions(dim);
- if (x<0)
- {
- x=0;
+ vtkImageData* img = _marImageData->GetImageData();
+ if(img!=NULL){
+ img->GetDimensions(dim);
+ if (x<0)
+ {
+ x=0;
+ }
+ if (x>=dim[0])
+ {
+ x=dim[0]-1;
+ };
+ _x=x;
}
- if (x>=dim[0])
- {
- x=dim[0]-1;
- };
- _x=x;
}
//-------------------------------------------------------------------
void vtkMPRBaseData::SetY(double y)
{
int dim[3];
- _marImageData->GetImageData()->GetDimensions(dim);
- if (y<0)
- {
- y=0;
+ vtkImageData* img = _marImageData->GetImageData();
+ if(img!=NULL){
+ img->GetDimensions(dim);
+ if (y<0)
+ {
+ y=0;
+ }
+ if (y>=dim[1])
+ {
+ y=dim[1]-1;
+ };
+ _y=y;
}
- if (y>=dim[1])
- {
- y=dim[1]-1;
- };
- _y=y;
}
//-------------------------------------------------------------------
vtkTransform *vtkMPRBaseData::GetTransformOrientation()
_ctfun->AddRGBPoint( 300 ,0 ,1,0);
_ctfun->AddRGBPoint( 400 ,0 ,0,1);
*/
- void *p=this;
+// void *p=this; // JPRx
// Create the first of the three planes. The filter vtkImageMapToColors
// maps the data through the corresponding lookup table created above. The