#else
//...
#endif
- createImage(result,_image2,dimImg2[0],dimImg2[1]);
+ createImage(result,_image2,dimImg1[0],dimImg1[1]);
} else if (numPixelsImg1>numPixelsImg2) {
//EED 2017-01-01 Migration VTK7
#if VTK_MAJOR_VERSION <= 5
#else
result->Modified();
#endif
- createImage(_image1,result,dimImg1[0],dimImg1[1]);
+ createImage(_image1,result,dimImg2[0],dimImg2[1]);
} else {
- //If both images have the same number of pixels, the resultant image will have the
+ //If both images have the same number of pixels, the resultant image will have the
//properties of the first image.
//EED 2017-01-01 Migration VTK7
#if VTK_MAJOR_VERSION <= 5
#endif
createImage(_image1,result,dimImg1[0],dimImg1[1]);
} //else
- resample->Delete();
+ resample->Delete();
_processed=true;
}
}
{
if(_type == VTK_CHAR)
{
- //POINTERS:
+ //POINTERS:
char* dataImagePointer1 = NULL;
char* dataImagePointer2 = NULL;
char* dataImageResultPointer = NULL;
createImageByType(dataImagePointer1, dataImagePointer2, dataImageResultPointer, img1, img2, sizeX, sizeY);
- }
- else if(_type == VTK_SIGNED_CHAR)
- {
- //POINTERS:
+ } else if(_type == VTK_SIGNED_CHAR) {
+ //POINTERS:
signed char* dataImagePointer1 = NULL;
signed char* dataImagePointer2 = NULL;
signed char* dataImageResultPointer = NULL;
createImageByType(dataImagePointer1, dataImagePointer2, dataImageResultPointer, img1, img2, sizeX, sizeY);
- }
- else if(_type == VTK_UNSIGNED_CHAR)
- {
- //POINTERS:
+ } else if(_type == VTK_UNSIGNED_CHAR) {
+ //POINTERS:
unsigned char* dataImagePointer1 = NULL;
unsigned char* dataImagePointer2 = NULL;
unsigned char* dataImageResultPointer = NULL;
createImageByType(dataImagePointer1, dataImagePointer2, dataImageResultPointer, img1, img2, sizeX, sizeY);
- }
- else if(_type == VTK_SHORT)
- {
- //POINTERS:
+ } else if(_type == VTK_SHORT) {
+ //POINTERS:
short* dataImagePointer1 = NULL;
short* dataImagePointer2 = NULL;
short* dataImageResultPointer = NULL;
createImageByType(dataImagePointer1, dataImagePointer2, dataImageResultPointer, img1, img2, sizeX, sizeY);
- }
- else if(_type == VTK_UNSIGNED_SHORT)
- {
- //POINTERS:
+ } else if(_type == VTK_UNSIGNED_SHORT) {
+ //POINTERS:
unsigned short* dataImagePointer1 = NULL;
unsigned short* dataImagePointer2 = NULL;
unsigned short* dataImageResultPointer = NULL;
createImageByType(dataImagePointer1, dataImagePointer2, dataImageResultPointer, img1, img2, sizeX, sizeY);
- }
- else if(_type == VTK_INT)
- {
- //POINTERS:
+ } else if(_type == VTK_INT) {
+ //POINTERS:
int* dataImagePointer1 = NULL;
int* dataImagePointer2 = NULL;
int* dataImageResultPointer = NULL;
createImageByType(dataImagePointer1, dataImagePointer2, dataImageResultPointer, img1, img2, sizeX, sizeY);
- }
- else if(_type == VTK_UNSIGNED_INT)
- {
- //POINTERS:
+ } else if(_type == VTK_UNSIGNED_INT) {
+ //POINTERS:
unsigned int* dataImagePointer1 = NULL;
unsigned int* dataImagePointer2 = NULL;
unsigned int* dataImageResultPointer = NULL;
createImageByType(dataImagePointer1, dataImagePointer2, dataImageResultPointer, img1, img2, sizeX, sizeY);
- }
- else if(_type == VTK_LONG)
- {
- //POINTERS:
+ } else if(_type == VTK_LONG) {
+ //POINTERS:
long* dataImagePointer1 = NULL;
long* dataImagePointer2 = NULL;
long* dataImageResultPointer = NULL;
createImageByType(dataImagePointer1, dataImagePointer2, dataImageResultPointer, img1, img2, sizeX, sizeY);
- }
- else if(_type == VTK_UNSIGNED_LONG)
- {
- //POINTERS:
+ } else if(_type == VTK_UNSIGNED_LONG) {
+ //POINTERS:
unsigned long* dataImagePointer1 = NULL;
unsigned long* dataImagePointer2 = NULL;
unsigned long* dataImageResultPointer = NULL;
createImageByType(dataImagePointer1, dataImagePointer2, dataImageResultPointer, img1, img2, sizeX, sizeY);
- }
- else if(_type == VTK_FLOAT)
- {
- //POINTERS:
+ } else if(_type == VTK_FLOAT) {
+ //POINTERS:
float* dataImagePointer1 = NULL;
float* dataImagePointer2 = NULL;
float* dataImageResultPointer = NULL;
createImageByType(dataImagePointer1, dataImagePointer2, dataImageResultPointer, img1, img2, sizeX, sizeY);
- }
- else if(_type == VTK_DOUBLE)
- {
- //POINTERS:
+ } else if(_type == VTK_DOUBLE) {
+ //POINTERS:
double* dataImagePointer1 = NULL;
double* dataImagePointer2 = NULL;
double* dataImageResultPointer = NULL;
createImageByType(dataImagePointer1, dataImagePointer2, dataImageResultPointer, img1, img2, sizeX, sizeY);
- }
+ } else {
+ printf("EED Error. Transparency::createImage Format not defined (%d) \n", _type);
+ }
//EED 2017-01-01 Migration VTK7
#if VTK_MAJOR_VERSION <= 5
#else
_newImage->Modified();
#endif
+
+
}
template <class T>
dataImagePointer2 = (T*)img2->GetScalarPointer(i,j,0);
dataImageResultPointer = (T*)_newImage->GetScalarPointer(i,j,0);
*dataImageResultPointer = (T)*dataImagePointer1*_percent + (T)*dataImagePointer2*(1-_percent);
- } // for h
+ } // for j
} // for i
}
{
if(_processed){
return _newImage;
- }
- else{
+ } else {
return NULL;
}
}