_bboxMapper = vtkPolyDataMapper::New();
_bboxMapper->ScalarVisibilityOff( );
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_bboxMapper->SetInput(_pd);
+#else
+ _bboxMapper->SetInputData(_pd);
+#endif
+
+
_bboxMapper->ImmediateModeRenderingOn();
_contourVtkActor->SetMapper(_bboxMapper);
_contourVtkActor->GetProperty()->BackfaceCullingOff();
_pointVtkActor = vtkActor::New();
_bboxMapper = vtkPolyDataMapper::New();
+
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_bboxMapper->SetInput(_pd);
+#else
+ _bboxMapper->SetInputData(_pd);
+#endif
+
+
// _bboxMapper->ImmediateModeRenderingOn();
_pointVtkActor->SetMapper(_bboxMapper);
// _pointVtkActor->GetProperty()->BackfaceCullingOn();
_auxImageFill->SetDimensions(_maxX + 1, _maxY + 1, _maxZ + 1);
_auxImageFill->SetOrigin(0, 0, 0);
_auxImageFill->SetExtent(0, _maxX, 0, _maxY, 0, _maxZ);
+
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_auxImageFill->SetWholeExtent(0, _maxX, 0, _maxY, 0, _maxZ);
_auxImageFill->SetScalarTypeToUnsignedChar();
_auxImageFill->AllocateScalars();
+#else
+ _auxImageFill->AllocateScalars(VTK_UNSIGNED_CHAR,1);
+#endif
+
+
}
//---------------------------------------------------------------------------
_image2 = image2;
int ext[6];
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_image->GetWholeExtent(ext);
+#else
+ _image->GetExtent(ext);
+#endif
_minX = 0;
_minY = 0;
_minZ = 0;
if (_image2!=NULL)
{
int extB[6];
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_image2->GetWholeExtent(extB);
+#else
+ _image2->GetExtent(extB);
+#endif
+
_maxX = std::min( ext[1]-ext[0] , extB[1]-extB[0] );
_maxY = std::min( ext[3]-ext[2] , extB[3]-extB[2] );
_maxZ = std::min( ext[5]-ext[4] , extB[5]-extB[4] );
//setting image data of the points
points->SetDimensions(xDimension,1,1);
//EED points->SetScalarTypeToUnsignedShort();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
points->SetScalarTypeToDouble();
points->AllocateScalars();
points->Update();
+#else
+ points->AllocateScalars(VTK_DOUBLE,1);
+#endif
+
}
/*
*/
char* dataImagePointerC = (char*)imageData->GetScalarPointer(0,0,0);
- unsigned char* dataImagePointerUC = (unsigned char*)imageData->GetScalarPointer(0,0,0);
+ unsigned char* dataImagePointerUC = (unsigned char*)imageData->GetScalarPointer(0,0,0);
short* dataImagePointerS = (short*)imageData->GetScalarPointer(0,0,0);
- unsigned short* dataImagePointerUS = (unsigned short*)imageData->GetScalarPointer(0,0,0);
+ unsigned short* dataImagePointerUS = (unsigned short*)imageData->GetScalarPointer(0,0,0);
float* dataImagePointerF = (float*)imageData->GetScalarPointer(0,0,0);
- double* dataImagePointerD = (double*)imageData->GetScalarPointer(0,0,0);
- double* dataHistogramPointer = (double*)points->GetScalarPointer(0,0,0);
+ double* dataImagePointerD = (double*)imageData->GetScalarPointer(0,0,0);
+ double* dataHistogramPointer = (double*)points->GetScalarPointer(0,0,0);
/*
Range of greys
wxVTKRenderWindowInteractor *iren = GetWxVTKRenderWindowInteractor();
vtkImageData *imageData = GetVtkBaseData()->GetImageData();
if(imageData){
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
imageData->UpdateInformation();
imageData->SetUpdateExtent( imageData->GetWholeExtent());
imageData->Update();
_imageViewer2XYZ->GetVtkImageViewer2()->SetInput(imageData );
+#else
+ _imageViewer2XYZ->GetVtkImageViewer2()->SetInputData(imageData );
+#endif
imageData->GetSpacing (spx,spy,spz);
imageData->GetExtent (x1,x2,y1,y2,z1,z2);
}
{
if (_imageViewer2XYZ!=NULL)
{
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_imageViewer2XYZ->GetVtkImageViewer2()->SetInput( imageData );
+#else
+ _imageViewer2XYZ->GetVtkImageViewer2()->SetInputData( imageData );
+#endif
} // if _imageViewer2XYZ
}
vtkImageData *imageData = GetVtkBaseData()->GetMarImageData()->GetImageData();
if (imageData!=NULL)
{
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
imageData->UpdateInformation();
imageData->SetUpdateExtent( imageData->GetWholeExtent());
imageData->Update();
+#else
+ //...
+#endif
+
if (okimage==true){
imageData->GetSpacing (spx,spy,spz);
imageData->GetExtent (x1,x2,y1,y2,z1,z2);
vtkStripper *stripper=_vtkclipping3Ddataviewer->GetTissueStripper(0);
vtkPolyData *polydata= stripper->GetOutput();
-
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_boxWidgetS1->SetInput( polydata );
+#else
+ _boxWidgetS1->SetInputData( polydata );
+#endif
//EED 2016-08-19
//_boxWidgetS1->PlaceWidget();
_boxWidgetVolume = vtkBoxWidget::New();
_boxWidgetVolume->SetInteractor( _wxvtk3Dbaseview->GetWxVTKRenderWindowInteractor() );
_boxWidgetVolume->SetPlaceFactor(1.25);
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_boxWidgetVolume->SetInput( this->GetVtkClipping3DDataViewer()->GetVtkMPRBaseData()->GetImageData() );
+#else
+ _boxWidgetVolume->SetInputData( this->GetVtkClipping3DDataViewer()->GetVtkMPRBaseData()->GetImageData() );
+#endif
+
_boxWidgetVolume->PlaceWidget();
_boxWidgetVolume->AddObserver( vtkCommand::InteractionEvent, _vtkclipping3Ddataviewer->GetObserverV() );
_boxWidgetVolume->HandlesOn ();
vtkTriangleFilter *filtro = vtkTriangleFilter::New();
- filtro->SetInput( this->_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetTissueClipper(idTissue)->GetOutput() );
vtkPolyDataConnectivityFilter *pdcf = vtkPolyDataConnectivityFilter::New();
- pdcf->SetInput( filtro->GetOutput() );
vtkClosePolyData *cpd = vtkClosePolyData::New();
+
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+ filtro->SetInput( this->_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetTissueClipper(idTissue)->GetOutput() );
+ pdcf->SetInput( filtro->GetOutput() );
cpd->SetInput( pdcf->GetOutput() );
+#else
+ filtro->SetInputData( this->_wxvtkclipping3Dview->GetVtkClipping3DDataViewer()->GetTissueClipper(idTissue)->GetOutput() );
+ pdcf->SetInputData( filtro->GetOutput() );
+ cpd->SetInputData( pdcf->GetOutput() );
+#endif
// 1.2 se escribe a disco el archivo stl de la superficie interna
cpd->Update();
vtkSTLWriter *writer = vtkSTLWriter::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
writer->SetInput( cpd->GetOutput() );
+#else
+ writer->SetInputData( cpd->GetOutput() );
+#endif
+
filename =prefix;
writer->SetFileName(filename.c_str());
writer->SetFileTypeToASCII();
_ptsA->SetPoint(1, 1000 , 1000 , 1000 );
_pdA = vtkPolyData::New();
_lineAMapper = vtkPolyDataMapper::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_lineAMapper->SetInput(_pdA);
+#else
+ _lineAMapper->SetInputData(_pdA);
+#endif
+
_lineAMapper->ImmediateModeRenderingOn();
_lineAActor->SetMapper(_lineAMapper);
}
_pdB->SetPoints( _ptsB );
_pdB->SetLines( linesB );
linesB->Delete(); //do not delete lines ??
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_lineBMapper->SetInput(_pdB);
+#else
+ _lineBMapper->SetInputData(_pdB);
+#endif
+
_lineBMapper->ImmediateModeRenderingOn();
if(_imageViewer2XYZ){
_imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->AddActor( _lineAActor );
if(_pointWidget==NULL){
_pointWidget = vtkPointWidget::New();
}
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_pointWidget->SetInput( imageData );
+#else
+ _pointWidget->SetInputData( imageData );
+#endif
_myCallback->SetVtkPointWidget(_pointWidget);
_pointWidget->SetInteractor( GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor() );
_pointWidget->AllOff();
{
_planeWidget = vtkPlaneWidget::New();
}
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_planeWidget->SetInput( imageData );
+#else
+ _planeWidget->SetInputData( imageData );
+#endif
_myCallback->SetVtkPlaneWidget(_planeWidget);
_vtkplane = vtkPolyData::New();
_probe = vtkProbeFilter::New();
- _probe->SetInput(_vtkplane);
-
_contourMapper = vtkPolyDataMapper::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+ _probe->SetInput(_vtkplane);
_contourMapper->SetInput( _probe->GetPolyDataOutput() );
+#else
+ _probe->SetInputData(_vtkplane);
+ _contourMapper->SetInputData( _probe->GetPolyDataOutput() );
+#endif
_contourPlaneActor = vtkActor::New();
_contourPlaneActor->SetMapper(_contourMapper);
}
_planeWidget->GetPolyData(_vtkplane);
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_probe->SetSource( imageData );
+#else
+ _probe->SetSourceData( imageData );
+#endif
_contourMapper->SetScalarRange( imageData->GetScalarRange() );
ConfigureFreePlanes();
{
vtkImageData *imageData = GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetImageData();
// Orthogonal planes B&W
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_planeWidgetX->SetInput( imageData );
_planeWidgetY->SetInput( imageData );
_planeWidgetZ->SetInput( imageData );
// -- Plane widget
_probe->SetSource( imageData );
+#else
+ _planeWidgetX->SetInputData( imageData );
+ _planeWidgetY->SetInputData( imageData );
+ _planeWidgetZ->SetInputData( imageData );
+ // -- Plane widget
+ _probe->SetSourceData( imageData );
+#endif
+
_vtkmpr3Ddataviewer->SetImage();
}
double xSpacing = 0, ySpacing = 0, zSpacing = 0;
if(image)
{
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
planeWidget->SetInput( image );
+#else
+ planeWidget->SetInputData( image );
+#endif
image->GetExtent(xMin, xMax, yMin, yMax, zMin, zMax);
image->GetSpacing(xSpacing, ySpacing, zSpacing);
}
if(_pointWidget)
{
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_pointWidget->SetInput( image );
+#else
+ _pointWidget->SetInputData( image );
+#endif
_pointWidget->PlaceWidget();
_pointWidget->SetPosition( x,y,z );
double spc[3];
vtkimagedata->GetSpacing(spc);
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
vtkimagedata->Update();
+#else
+ // ..
+#endif
double p[3], n[3];
pSource->Update( );
vtkProbeFilter* slices = vtkProbeFilter::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
slices->SetInput( ( vtkDataSet* )pSource->GetOutput( ) );
slices->SetSource( vtkimagedata );
slices->Update( );
pSource->Delete( );
+#else
+ slices->SetInputData( ( vtkDataSet* )pSource->GetOutput( ) );
+ slices->SetSourceData( vtkimagedata );
+#endif
vtkStructuredPoints *stPoints = vtkStructuredPoints::New();
stPoints -> GetPointData( )->SetScalars( slices->GetOutput()->GetPointData()->GetScalars() );
stPoints -> SetDimensions( sizeIma, sizeIma, 1 );
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
stPoints -> SetScalarType( vtkimagedata->GetScalarType() );
stPoints -> SetScalarTypeToShort();
stPoints -> Update();
+#else
+ vtkInformation* info=stPoints->GetInformation();
+ vtkDataObject::SetPointDataActiveScalarInfo(info, VTK_SHORT, 1);
+#endif
+
+
vtkImageChangeInformation *change = vtkImageChangeInformation ::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
change -> SetInput( stPoints );
+#else
+ change -> SetInputData( stPoints );
+#endif
change -> Update(); //important
double _range[2];
vtkMetaImageWriter *writer = vtkMetaImageWriter::New( );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
writer->SetInput( stPoints );
+#else
+ writer->SetInputData( stPoints );
+#endif
writer->SetFileName( "C:/Users/Images/temp_EED/image.mhd" );
writer->SetFileDimensionality( 2 );
writer->Write( );
vtkDataSetMapper *_3DSliceMapper = vtkDataSetMapper::New( );
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_3DSliceMapper->SetInput(change->GetOutput( ) );
+#else
+ _3DSliceMapper->SetInputData(change->GetOutput( ) );
+#endif
+
_3DSliceMapper->SetLookupTable( _bwlookup );
_3DSliceMapper->SetScalarRange( _range );
_3DSliceMapper->ImmediateModeRenderingOn( );
vtkCutter* sliceCutter = vtkCutter::New();
vtkImageData *vtkimagedata = this->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetImageData();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
sliceCutter->SetInput( vtkimagedata );
+#else
+ sliceCutter->SetInputData( vtkimagedata );
+#endif
sliceCutter->SetCutFunction( slicePlane );
//EED
// vtkLookupTable *lut = BuildHueWeightBaseMap();
vtkPolyDataMapper *slice = vtkPolyDataMapper::New();
- slice->SetInput( sliceCutter->GetOutput() );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+ slice->SetInput( sliceCutter->GetOutput() );
+#else
+ slice->SetInputData( sliceCutter->GetOutput() );
+#endif
double range[2];
// EED
// slice->Update();
// sliceActor->SetMapper( slice );
vtkPolyDataMapper *contourMapper = vtkPolyDataMapper::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
contourMapper->SetInput( sliceCutter->GetOutput() );
+#else
+ contourMapper->SetInputData( sliceCutter->GetOutput() );
+#endif
+
contourMapper->SetScalarRange( range );
// contourMapper->SetLookupTable( lut );
lines->Delete(); //do not delete lines ??
_circle1Actor = vtkActor::New();
_circle1Mapper = vtkPolyDataMapper::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_circle1Mapper->SetInput(_pdCircle1);
+#else
+ _circle1Mapper->SetInputData(_pdCircle1);
+#endif
_circle1Mapper->ImmediateModeRenderingOn();
_circle1Actor->SetMapper(_circle1Mapper);
_circle1Actor->GetProperty()->BackfaceCullingOn();
lines->Delete(); //do not delete lines ??
_circle2Actor = vtkActor::New();
_circle2Mapper = vtkPolyDataMapper::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_circle2Mapper->SetInput(_pdCircle2);
+#else
+ _circle2Mapper->SetInputData(_pdCircle2);
+#endif
_circle2Mapper->ImmediateModeRenderingOn();
_circle2Actor->SetMapper(_circle2Mapper);
_circle2Actor->GetProperty()->BackfaceCullingOn();
lines->Delete(); //do not delete lines ??
_lineRef1Actor = vtkActor::New();
_lineRef1Mapper = vtkPolyDataMapper::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_lineRef1Mapper->SetInput(_pdLineRef1);
+#else
+ _lineRef1Mapper->SetInputData(_pdLineRef1);
+#endif
+
_lineRef1Mapper->ImmediateModeRenderingOn();
_lineRef1Actor->SetMapper(_lineRef1Mapper);
_lineRef1Actor->GetProperty()->BackfaceCullingOn();
lines->Delete(); //do not delete lines ??
_lineRef2Actor = vtkActor::New();
_lineRef2Mapper = vtkPolyDataMapper::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_lineRef2Mapper->SetInput(_pdLineRef2);
+#else
+ _lineRef2Mapper->SetInputData(_pdLineRef2);
+#endif
+
_lineRef2Mapper->ImmediateModeRenderingOn();
_lineRef2Actor->SetMapper(_lineRef2Mapper);
_lineRef2Actor->GetProperty()->BackfaceCullingOn();
:PlanesOperations(){
_vtkarrow = vtkArrowSource::New();
_arrowMapper = vtkPolyDataMapper::New();
- _arrowActor = vtkActor::New();
+ _arrowActor = vtkActor::New();
_vtkarrow->SetTipResolution(30);
_vtkarrow->SetShaftResolution( 30 );
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
_arrowMapper->SetInput( _vtkarrow->GetOutput() );
+#else
+ _arrowMapper->SetInputData( _vtkarrow->GetOutput() );
+#endif
+
_arrowActor->SetMapper(_arrowMapper);
- _radio = radio;
- _colour = colour;
- _opacity = opacity;
-
- p0 = new double[3];
- p0[0] = 0;
- p0[1] = 0;
- p0[2] = 0;
- p1 = new double[3];
- p1[0] = 0;
- p1[1] = 0;
- p1[2] = 0;
- p2 = new double[3];
- p2[0] = 1;
- p2[1] = 1;
- p2[2] = 1;
- _dir = new double[3];
- _dir[0] = 0;
- _dir[1] = 0;
- _dir[2] = 0;
+ _radio = radio;
+ _colour = colour;
+ _opacity = opacity;
+
+ p0 = new double[3];
+ p0[0] = 0;
+ p0[1] = 0;
+ p0[2] = 0;
+ p1 = new double[3];
+ p1[0] = 0;
+ p1[1] = 0;
+ p1[2] = 0;
+ p2 = new double[3];
+ p2[0] = 1;
+ p2[1] = 1;
+ p2[2] = 1;
+ _dir = new double[3];
+ _dir[0] = 0;
+ _dir[1] = 0;
+ _dir[2] = 0;
}
void marRAW2Files::FlipY(vtkImageData *imagedata)
{
vtkImageData *vtkimagedata = imagedata;
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
vtkimagedata->Update();
+#else
+ //...
+#endif
int dim[3];
vtkimagedata->GetDimensions(dim);
unsigned short tmp;
}
}
}
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
vtkimagedata->Update();
+#else
+ vtkimagedata->Modified();
+#endif
}
// -------------------------------------------------------------------------
// Crop
vtkExtractVOI *crop = vtkExtractVOI::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
crop->SetInput( imagedata );
+#else
+ crop->SetInputData( imagedata );
+#endif
crop->SetVOI( voi );
crop->Update();
vtkImageChangeInformation* change = vtkImageChangeInformation::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
change->SetInput( crop->GetOutput() );
+#else
+ change->SetInputData( crop->GetOutput() );
+#endif
// change->SetExtentTranslation( -ext[0], -ext[2], -ext[4] );
std::string nameMW = filename+".mhd";
vtkMetaImageWriter *writer = vtkMetaImageWriter::New( );
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
writer->SetInput( change->GetOutput() );
+#else
+ writer->SetInputData( change->GetOutput() );
+#endif
+
writer->SetFileName( nameMW.c_str() );
writer->SetFileDimensionality( 3 );
writer->Write( );
#ifdef KGFO_USE_VTK
- vtkCharArray* carray;
- vtkDoubleArray* darray;
- vtkFloatArray* farray;
- vtkIntArray* iarray;
- vtkShortArray* sarray;
- vtkUnsignedCharArray* ucarray;
- vtkUnsignedIntArray* uiarray;
- vtkUnsignedShortArray* usarray;
+ vtkCharArray *carray;
+ vtkDoubleArray *darray;
+ vtkFloatArray *farray;
+ vtkIntArray *iarray;
+ vtkShortArray *sarray;
+ vtkUnsignedCharArray *ucarray;
+ vtkUnsignedIntArray *uiarray;
+ vtkUnsignedShortArray *usarray;
size = _dims[ CX ] * _dims[ CY ] * _dims[ CZ ];
_vtk->SetDimensions( _dims[ CX ], _dims[ CY ], _dims[ CZ ] );
_vtk->SetSpacing( _sizes[ CX ], _sizes[ CY ], _sizes[ CZ ] );
+ if (_type==CHAR)
+ {
+ carray = vtkCharArray::New( );
+ carray->SetArray( ( char* )( _raw ), size, 1 );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+ carray->SetNumberOfComponents( 1 );
+ _vtk->SetScalarType( VTK_CHAR );
+#else
+ vtkInformation* infoC=_vtk->GetInformation();
+ vtkDataObject::SetPointDataActiveScalarInfo(infoC, VTK_CHAR, 1);
+#endif
+ _vtk->GetPointData( )->SetScalars( carray );
+ carray->Delete( );
+ }
+
+ if (_type==UCHAR)
+ {
+ ucarray = vtkUnsignedCharArray::New( );
+ ucarray->SetArray( ( uint8_t* )( _raw ), size, 1 );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+ ucarray->SetNumberOfComponents( 1 );
+ _vtk->SetScalarType( VTK_UNSIGNED_CHAR );
+#else
+ vtkInformation* infoUC=_vtk->GetInformation();
+ vtkDataObject::SetPointDataActiveScalarInfo(infoUC, VTK_UNSIGNED_CHAR, 1);
+#endif
+ _vtk->GetPointData( )->SetScalars( ucarray );
+ ucarray->Delete( );
+ }
+
+
+
+
+
+ if (_type==SHORT)
+ {
+ sarray = vtkShortArray::New( );
+ sarray->SetArray( ( int16_t* )( _raw ), size, 1 );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+ sarray->SetNumberOfComponents( 1 );
+ _vtk->SetScalarType( VTK_SHORT );
+#else
+ vtkInformation* infoS=_vtk->GetInformation();
+ vtkDataObject::SetPointDataActiveScalarInfo(infoS, VTK_SHORT, 1);
+#endif
+ _vtk->GetPointData( )->SetScalars( sarray );
+ sarray->Delete( );
+}
+
+ if (_type==INT)
+ {
+ iarray = vtkIntArray::New( );
+ iarray->SetArray( ( int32_t* )( _raw ), size, 1 );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+ iarray->SetNumberOfComponents( 1 );
+ _vtk->SetScalarType( VTK_INT );
+#else
+ vtkInformation* infoI=_vtk->GetInformation();
+ vtkDataObject::SetPointDataActiveScalarInfo(infoI, VTK_INT, 1);
+#endif
+ _vtk->GetPointData( )->SetScalars( iarray );
+ iarray->Delete( );
+ }
+
+
+ if (_type==USHORT)
+ {
+ usarray = vtkUnsignedShortArray::New( );
+ usarray->SetArray( ( uint16_t* )( _raw ), size, 1 );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+ usarray->SetNumberOfComponents( 1 );
+ _vtk->SetScalarType( VTK_UNSIGNED_SHORT );
+#else
+ vtkInformation* infoUS=_vtk->GetInformation();
+ vtkDataObject::SetPointDataActiveScalarInfo(infoUS, VTK_UNSIGNED_SHORT, 1);
+#endif
+ _vtk->GetPointData( )->SetScalars( usarray );
+ usarray->Delete( );
+ }
+
+
+ if (_type==UINT)
+ {
+ uiarray = vtkUnsignedIntArray::New( );
+ uiarray->SetArray( ( uint32_t* )( _raw ), size, 1 );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+ uiarray->SetNumberOfComponents( 1 );
+ _vtk->SetScalarType( VTK_UNSIGNED_INT );
+#else
+ vtkInformation* infoUI=_vtk->GetInformation();
+ vtkDataObject::SetPointDataActiveScalarInfo(infoUI, VTK_UNSIGNED_INT, 1);
+#endif
+ _vtk->GetPointData( )->SetScalars( uiarray );
+ uiarray->Delete( );
+ }
+
+
+ if (_type==FLOAT)
+ {
+ farray = vtkFloatArray::New( );
+ farray->SetArray( ( float* )( _raw ), size, 1 );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+ farray->SetNumberOfComponents( 1 );
+ _vtk->SetScalarType( VTK_FLOAT );
+#else
+ vtkInformation* infoF=_vtk->GetInformation();
+ vtkDataObject::SetPointDataActiveScalarInfo(infoF, VTK_FLOAT, 1);
+#endif
+ _vtk->GetPointData( )->SetScalars( farray );
+ farray->Delete( );
+ }
+
+
+ if (_type==DOUBLE)
+ {
+ darray = vtkDoubleArray::New( );
+ darray->SetArray( ( double* )( _raw ), size, 1 );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+ darray->SetNumberOfComponents( 1 );
+ _vtk->SetScalarType( VTK_DOUBLE );
+#else
+ vtkInformation* infoD=_vtk->GetInformation();
+ vtkDataObject::SetPointDataActiveScalarInfo(infoD, VTK_DOUBLE, 1);
+#endif
+
+
+ _vtk->GetPointData( )->SetScalars( darray );
+ darray->Delete( );
+ }
+
+
+
+
+
+
+/*
switch( _type ) {
case CHAR:
carray = vtkCharArray::New( );
- carray->SetNumberOfComponents( 1 );
carray->SetArray( ( char* )( _raw ), size, 1 );
+
+//EED 2017-01-01 Migration VTK7
+//#if VTK_MAJOR_VERSION <= 5
+ carray->SetNumberOfComponents( 1 );
_vtk->SetScalarType( VTK_CHAR );
+#else
+ vtkInformation* infoC=_vtk->GetInformation();
+ vtkDataObject::SetPointDataActiveScalarInfo(infoC, VTK_CHAR, 1);
+#endif
+
_vtk->GetPointData( )->SetScalars( carray );
carray->Delete( );
break;
case UCHAR:
ucarray = vtkUnsignedCharArray::New( );
- ucarray->SetNumberOfComponents( 1 );
ucarray->SetArray( ( uint8_t* )( _raw ), size, 1 );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+ ucarray->SetNumberOfComponents( 1 );
_vtk->SetScalarType( VTK_UNSIGNED_CHAR );
+#else
+ vtkInformation* infoUC=_vtk->GetInformation();
+ vtkDataObject::SetPointDataActiveScalarInfo(infoUC, VTK_UNSIGNED_CHAR, 1);
+#endif
_vtk->GetPointData( )->SetScalars( ucarray );
ucarray->Delete( );
break;
case SHORT:
sarray = vtkShortArray::New( );
- sarray->SetNumberOfComponents( 1 );
sarray->SetArray( ( int16_t* )( _raw ), size, 1 );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+ sarray->SetNumberOfComponents( 1 );
_vtk->SetScalarType( VTK_SHORT );
+#else
+ vtkInformation* infoS=_vtk->GetInformation();
+ vtkDataObject::SetPointDataActiveScalarInfo(infoS, VTK_SHORT, 1);
+#endif
_vtk->GetPointData( )->SetScalars( sarray );
sarray->Delete( );
break;
case INT:
iarray = vtkIntArray::New( );
- iarray->SetNumberOfComponents( 1 );
iarray->SetArray( ( int32_t* )( _raw ), size, 1 );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+ iarray->SetNumberOfComponents( 1 );
_vtk->SetScalarType( VTK_INT );
+#else
+ vtkInformation* infoI=_vtk->GetInformation();
+ vtkDataObject::SetPointDataActiveScalarInfo(infoI, VTK_INT, 1);
+#endif
_vtk->GetPointData( )->SetScalars( iarray );
iarray->Delete( );
break;
case USHORT:
usarray = vtkUnsignedShortArray::New( );
- usarray->SetNumberOfComponents( 1 );
usarray->SetArray( ( uint16_t* )( _raw ), size, 1 );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+ usarray->SetNumberOfComponents( 1 );
_vtk->SetScalarType( VTK_UNSIGNED_SHORT );
+#else
+ vtkInformation* infoUS=_vtk->GetInformation();
+ vtkDataObject::SetPointDataActiveScalarInfo(infoUS, VTK_UNSIGNED_SHORT, 1);
+#endif
_vtk->GetPointData( )->SetScalars( usarray );
usarray->Delete( );
break;
case UINT:
uiarray = vtkUnsignedIntArray::New( );
- uiarray->SetNumberOfComponents( 1 );
uiarray->SetArray( ( uint32_t* )( _raw ), size, 1 );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+ uiarray->SetNumberOfComponents( 1 );
_vtk->SetScalarType( VTK_UNSIGNED_INT );
+#else
+ vtkInformation* infoUI=_vtk->GetInformation();
+ vtkDataObject::SetPointDataActiveScalarInfo(infoUI, VTK_UNSIGNED_INT, 1);
+#endif
_vtk->GetPointData( )->SetScalars( uiarray );
uiarray->Delete( );
break;
case FLOAT:
farray = vtkFloatArray::New( );
- farray->SetNumberOfComponents( 1 );
farray->SetArray( ( float* )( _raw ), size, 1 );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+ farray->SetNumberOfComponents( 1 );
_vtk->SetScalarType( VTK_FLOAT );
+#else
+ vtkInformation* infoF=_vtk->GetInformation();
+ vtkDataObject::SetPointDataActiveScalarInfo(infoF, VTK_FLOAT, 1);
+#endif
_vtk->GetPointData( )->SetScalars( farray );
farray->Delete( );
break;
case DOUBLE:
darray = vtkDoubleArray::New( );
- darray->SetNumberOfComponents( 1 );
darray->SetArray( ( double* )( _raw ), size, 1 );
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+ darray->SetNumberOfComponents( 1 );
_vtk->SetScalarType( VTK_DOUBLE );
+#else
+ vtkInformation* infoD=_vtk->GetInformation();
+ vtkDataObject::SetPointDataActiveScalarInfo(infoD, VTK_DOUBLE, 1);
+#endif
+
+
_vtk->GetPointData( )->SetScalars( darray );
darray->Delete( );
break;
} // fswitch
-
+*/
+
} // fi
#endif // KGFO_USE_VTK