if (bbGetInputOutputFormat()=="VTK_BIT") outputformat = VTK_BIT; // 1
- else if (bbGetInputOutputFormat()=="VTK_CHAR") outputformat = VTK_CHAR; // 2
+ else if (bbGetInputOutputFormat()=="VTK_CHAR") outputformat = VTK_CHAR; // 2
+ else if (bbGetInputOutputFormat()=="MET_CHAR") outputformat = VTK_CHAR; // 2
else if (bbGetInputOutputFormat()=="VTK_SIGNED_CHAR") outputformat = VTK_SIGNED_CHAR; // 15
+ else if (bbGetInputOutputFormat()=="MET_UCHAR") outputformat = VTK_UNSIGNED_CHAR; // 3
else if (bbGetInputOutputFormat()=="VTK_UNSIGNED_CHAR") outputformat = VTK_UNSIGNED_CHAR; // 3
else if (bbGetInputOutputFormat()=="VTK_SHORT") outputformat = VTK_SHORT; // 4
+ else if (bbGetInputOutputFormat()=="MET_SHORT") outputformat = VTK_SHORT; // 4
else if (bbGetInputOutputFormat()=="VTK_UNSIGNED_SHORT") outputformat = VTK_UNSIGNED_SHORT; // 5
+ else if (bbGetInputOutputFormat()=="MET_USHORT") outputformat = VTK_UNSIGNED_SHORT; // 5
else if (bbGetInputOutputFormat()=="VTK_INT") outputformat = VTK_INT; // 6
+ else if (bbGetInputOutputFormat()=="MET_INT") outputformat = VTK_INT; // 6
else if (bbGetInputOutputFormat()=="VTK_UNSIGNED_INT") outputformat = VTK_UNSIGNED_INT; // 7
+ else if (bbGetInputOutputFormat()=="MEY_UINT") outputformat = VTK_UNSIGNED_INT; // 7
else if (bbGetInputOutputFormat()=="VTK_LONG") outputformat = VTK_LONG; // 8
+ else if (bbGetInputOutputFormat()=="MET_LONG") outputformat = VTK_LONG; // 8
else if (bbGetInputOutputFormat()=="VTK_UNSIGNED_LONG") outputformat = VTK_UNSIGNED_LONG; // 9
+ else if (bbGetInputOutputFormat()=="MET_ULONG") outputformat = VTK_UNSIGNED_LONG; // 9
else if (bbGetInputOutputFormat()=="VTK_FLOAT") outputformat = VTK_FLOAT; // 10
- else if (bbGetInputOutputFormat()=="VTK_DOUBLE") outputformat = VTK_DOUBLE; // 11
-
+ else if (bbGetInputOutputFormat()=="MET_FLOAT") outputformat = VTK_FLOAT; // 10
+ else if (bbGetInputOutputFormat()=="VTK_DOUBLE") outputformat = VTK_DOUBLE; // 11
+ else if (bbGetInputOutputFormat()=="MET_DOUBLE") outputformat = VTK_DOUBLE; // 11
+
+
+
spc[0] = bbGetInputSpacing()[0];
spc[1] = bbGetInputSpacing()[1];
spc[2] = bbGetInputSpacing()[2];
if ((bbGetInputImageFix()!=NULL) && (bbGetInputImageMove()!=NULL) )
{
-printf("EED InversCrop::Process ScalarType %d %d \n", bbGetInputImageFix()->GetScalarType(), bbGetInputImageMove()->GetScalarType() );
if ( bbGetInputImageFix()->GetScalarType()==bbGetInputImageMove()->GetScalarType() )
{
// Creating Image
dim[0]= ext[1]-ext[0]+1;
dim[1]= ext[3]-ext[2]+1;
dim[2]= ext[5]-ext[4]+1;
-
- _imageoutput = vtkImageData::New();
- _imageoutput->Initialize();
- _imageoutput->SetScalarType( bbGetInputImageFix()->GetScalarType() );
- _imageoutput->SetSpacing( bbGetInputImageFix()->GetSpacing() );
- _imageoutput->SetDimensions( dim[0], dim[1], dim[2] );
- _imageoutput->AllocateScalars();
+
+ if (bbGetInputType()==0)
+ {
+ _imageoutput = vtkImageData::New();
+ _imageoutput->Initialize();
+ _imageoutput->SetScalarType( bbGetInputImageFix()->GetScalarType() );
+ _imageoutput->SetSpacing( bbGetInputImageFix()->GetSpacing() );
+ _imageoutput->SetDimensions( dim[0], dim[1], dim[2] );
+ _imageoutput->AllocateScalars();
+ }
+ if (bbGetInputType()==1)
+ {
+ _imageoutput=bbGetInputImageFix();
+ }
+
// Duplicating Fix Image
long sizeimage = dim[0]*dim[1]*dim[2]*bbGetInputImageFix()->GetScalarSize();
// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
// Here we initialize the input 'In' to 0
+ bbSetInputType(0);
bbSetInputImageFix(NULL);
bbSetInputImageMove(NULL);
//=====
// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
//=====
+ BBTK_DECLARE_INPUT(Type,int);
BBTK_DECLARE_INPUT(ImageFix,vtkImageData*);
BBTK_DECLARE_INPUT(ImageMove,vtkImageData*);
BBTK_DECLARE_INPUT(Origin,std::vector<int>);
BBTK_DESCRIPTION("Invers Crop, Both images had to have the same format");
BBTK_CATEGORY("");
+ BBTK_INPUT(InversCrop,Type,"(default 0) 0=Create image for de result FixImage+MoveImage, 1=Use the FixImage as output",int,"");
BBTK_INPUT(InversCrop,ImageFix,"Fix Image (necesary). Need same format of ImageMove",vtkImageData*,"");
BBTK_INPUT(InversCrop,ImageMove,"Move Image (necesary). Need same format of ImageFix",vtkImageData*,"");
BBTK_INPUT(InversCrop,Origin,"Position to be put de Move Image (default 0,0,0 )",std::vector<int>,"");
wx:LayoutLine:controls
ISEXEC:FALSE
97.896195:-54.335314:-900.000000
-155.456195:-64.335314:-900.000000
+143.471195:-64.335314:-900.000000
PORT
Orientation:"HORIZONTAL"
FIN_BOX