ENDIF(crea_FOUND)
+
+
+
CREA_PREVENT_IN_SOURCE_BUILD()
#SET(USE_GDCM ON)
SET(OUTPUT_DATA_DIR ${PROJECT_BINARY_DIR}/data)
CREA_CPDIR(${INPUT_DATA_DIR} ${OUTPUT_DATA_DIR})
ENDIF(WIN32)
+
+
+#. ---- MacOs ---------
+#EED /Library/Developer/CommandLineTools/usr/bin/c++
+#EED FLAGS C++ : -Xpreprocessor -fopenmp
+# http://secomparteosepierde.blogspot.com/2019/04/how-to-install-openmp-on-mac-using.html
+# https://stackoverflow.com/questions/23554716/using-openmp-on-windows-with-mingw-cannot-find-lpthread
+#You need -Xpreprocessor flag to use -fopenmp flag
+#
+# sudo port install libomp-devel
+# sudo port -f activate libomp-devel
+
+##. This cmake code is not working ?????? MacOs..
+
+message(STATUS "Checking OpenMP")
+find_package(OpenMP)
+IF(OPENMP_FOUND)
+ message("Found OpenMP! ^_^")
+ # add flags for OpenMP
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${OpenMP_SHARED_LINKER_FLAGS}")
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
+ELSE()
+ message("Missed OpenMP! :(")
+ENDIF()
+
_dataMapper = vtkPolyDataMapper::New( );
_dataMapper->ScalarVisibilityOff( );
- _dataMapper->ImmediateModeRenderingOn();
+
+//EED vtk 8 method deprecated
+// _dataMapper->ImmediateModeRenderingOn();
+
vtkActor* dataActor = vtkActor::New();
//if(_boxWidgetS1){
void ContourView::CreateNewContour(vtkPolyData *contour, int type)
{
contour_mapped.push_back(vtkPolyDataMapper::New());
- contour_mapped.back()->ImmediateModeRenderingOn();
contour_mapped.back()->ScalarVisibilityOff( );
//EED 2017-01-01 Migration VTK7
#if VTK_MAJOR_VERSION <= 5
+ contour_mapped.back()->ImmediateModeRenderingOn();
contour_mapped.back()->SetInput(contour);
#else
contour_mapped.back()->SetInputData(contour);
//EED 2017-01-01 Migration VTK7
#if VTK_MAJOR_VERSION <= 5
contour_mapped.back()->SetInput(aLineGrid);
+ contour_mapped.back()->ImmediateModeRenderingOn();
#else
contour_mapped.back()->SetInputData(aLineGrid);
#endif
- contour_mapped.back()->ImmediateModeRenderingOn();
contour_actor.back()->SetMapper(contour_mapped.back());
contour_actor.back()->GetProperty()->BackfaceCullingOn();
//EED 2017-01-01 Migration VTK7
#if VTK_MAJOR_VERSION <= 5
_bboxMapper->SetInput(_pd);
+ _bboxMapper->ImmediateModeRenderingOn();
#else
_bboxMapper->SetInputData(_pd);
#endif
- _bboxMapper->ImmediateModeRenderingOn();
_contourVtkActor->SetMapper(_bboxMapper);
_contourVtkActor->GetProperty()->BackfaceCullingOff();
//EED 2017-01-01 Migration VTK7
#if VTK_MAJOR_VERSION <= 5
_lineMapper->SetInput(_pd);
+ _lineMapper->ImmediateModeRenderingOn();
#else
_lineMapper->SetInputData(_pd);
#endif
- _lineMapper->ImmediateModeRenderingOn();
_lineActor->SetMapper(_lineMapper);
_lineActor->GetProperty()->BackfaceCullingOn();
_lineActor->GetProperty()->SetDiffuseColor(0,0,1);
//EED 2017-01-01 Migration VTK7
#if VTK_MAJOR_VERSION <= 5
_2_isoMapperMC6->SetInput(_2_isoMC6->GetOutput());
+ _2_isoMapperMC6->ImmediateModeRenderingOn();
#else
_2_isoMapperMC6->SetInputData(_2_isoMC6->GetOutput());
#endif
_2_isoMapperMC6->ScalarVisibilityOff();
- _2_isoMapperMC6->ImmediateModeRenderingOn();
vtkRenderer *ren = _wxMaracasMPR->GetWxvtkmpr3Dview_BB()->GetWxvtk3Dbaseview()->GetRenderer();
//EED 2017-01-01 Migration VTK7
#if VTK_MAJOR_VERSION <= 5
_lineAMapper->SetInput(_pdA);
+ _lineAMapper->ImmediateModeRenderingOn();
#else
_lineAMapper->SetInputData(_pdA);
#endif
- _lineAMapper->ImmediateModeRenderingOn();
_lineAActor->SetMapper(_lineAMapper);
}
//EED 2017-01-01 Migration VTK7
#if VTK_MAJOR_VERSION <= 5
_lineBMapper->SetInput(_pdB);
+ _lineBMapper->ImmediateModeRenderingOn();
#else
_lineBMapper->SetInputData(_pdB);
#endif
- _lineBMapper->ImmediateModeRenderingOn();
if(_imageViewer2XYZ)
{
_imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->AddActor( _lineAActor );
#include "vtkCellPicker.h"
#include "vtkInteractorStyleBaseView.h"
#include <vtkImageReslice.h>
+#include "vtkTexture.h"
{
_planeWidgetX->SetSlicePosition( x*spc[0] );
//EED 2016/02/19
-// _planeWidgetX->GetReslice()->SetInterpolate( _vtkmpr3Ddataviewer->GetVtkMPRBaseData()->GetInterpolate() );
+ _planeWidgetX->GetReslice()->SetInterpolate( _vtkmpr3Ddataviewer->GetVtkMPRBaseData()->GetInterpolate() );
_planeWidgetX->GetTexture()->SetInterpolate( _vtkmpr3Ddataviewer->GetVtkMPRBaseData()->GetInterpolate() );
}
// FreePlaneY
_planeWidgetZ->GetReslice()->SetInterpolate( _vtkmpr3Ddataviewer->GetVtkMPRBaseData()->GetInterpolate() );
_planeWidgetZ->GetTexture()->SetInterpolate( _vtkmpr3Ddataviewer->GetVtkMPRBaseData()->GetInterpolate() );
}
-
- x=x*spc[0];
- y=y*spc[1];
- z=z*spc[2];
-
+ x = x*spc[0];
+ y = y*spc[1];
+ z = z*spc[2];
if(_pointWidget)
{
//EED 2017-01-01 Migration VTK7
//EED 2017-01-01 Migration VTK7
#if VTK_MAJOR_VERSION <= 5
_3DSliceMapper->SetInput(change->GetOutput( ) );
+ _3DSliceMapper->ImmediateModeRenderingOn( );
#else
_3DSliceMapper->SetInputData(change->GetOutput( ) );
#endif
_3DSliceMapper->SetLookupTable( _bwlookup );
_3DSliceMapper->SetScalarRange( _range );
- _3DSliceMapper->ImmediateModeRenderingOn( );
vtkActor *_3DSliceActor = vtkActor::New( );
_3DSliceActor->SetMapper( _3DSliceMapper );
//EED 2017-01-01 Migration VTK7
#if VTK_MAJOR_VERSION <= 5
_circle1Mapper->SetInput(_pdCircle1);
+ _circle1Mapper->ImmediateModeRenderingOn();
#else
_circle1Mapper->SetInputData(_pdCircle1);
#endif
- _circle1Mapper->ImmediateModeRenderingOn();
_circle1Actor->SetMapper(_circle1Mapper);
_circle1Actor->GetProperty()->BackfaceCullingOn();
_circle1Actor->GetProperty()->SetDiffuseColor(0,0,1);
//EED 2017-01-01 Migration VTK7
#if VTK_MAJOR_VERSION <= 5
_circle2Mapper->SetInput(_pdCircle2);
+ _circle2Mapper->ImmediateModeRenderingOn();
#else
_circle2Mapper->SetInputData(_pdCircle2);
#endif
- _circle2Mapper->ImmediateModeRenderingOn();
_circle2Actor->SetMapper(_circle2Mapper);
_circle2Actor->GetProperty()->BackfaceCullingOn();
_circle2Actor->GetProperty()->SetDiffuseColor(0,0,1);
//EED 2017-01-01 Migration VTK7
#if VTK_MAJOR_VERSION <= 5
_lineRef1Mapper->SetInput(_pdLineRef1);
+ _lineRef1Mapper->ImmediateModeRenderingOn();
#else
_lineRef1Mapper->SetInputData(_pdLineRef1);
#endif
- _lineRef1Mapper->ImmediateModeRenderingOn();
_lineRef1Actor->SetMapper(_lineRef1Mapper);
_lineRef1Actor->GetProperty()->BackfaceCullingOn();
_lineRef1Actor->GetProperty()->SetDiffuseColor(0,0,1);
//EED 2017-01-01 Migration VTK7
#if VTK_MAJOR_VERSION <= 5
_lineRef2Mapper->SetInput(_pdLineRef2);
+ _lineRef2Mapper->ImmediateModeRenderingOn();
#else
_lineRef2Mapper->SetInputData(_pdLineRef2);
#endif
- _lineRef2Mapper->ImmediateModeRenderingOn();
_lineRef2Actor->SetMapper(_lineRef2Mapper);
_lineRef2Actor->GetProperty()->BackfaceCullingOn();
_lineRef2Actor->GetProperty()->SetDiffuseColor(0,0,1);