std::cout << "[" << this << "]" << "PolyDataReaderPlus::Process()..." << std::endl;
//Review the observers...
- if (!HasObserver(OBS_POST_READER_1) && bbGetInputInPostReadObs1() != NULL)
- AddObserver(OBS_POST_READER_1, bbGetInputInPostReadObs1());
-
+ if (!HasObserver(OBS_POST_READER_1) && bbGetInputInPostReadObs1() != NULL)
+ {
+ AddObserver(OBS_POST_READER_1, bbGetInputInPostReadObs1());
+ }
+
if (bbGetInputInPath().size()==0)
{
std::cout << "Set InPath." << std::endl;
{
std::vector< std::string > partes = StringSplit(bbGetInputInPath(), ".");
std::string extension = partes.at(partes.size()-1);
-
std::cout << "Extension (vtk o vtp?) = " << extension << std::endl;
-
if (extension.compare("vtk") == 0)
{
//vtkPolyDataReader* reader = vtkPolyDataReader::New();
vtkPolyData* old = bbGetOutputOut(); // old unused ? // JPR
bbSetOutputOut(informacion);
readed = true;
- }
-
+ } // if vtk
if (extension.compare("vtp") == 0)
{
vtkXMLPolyDataReader* reader = vtkXMLPolyDataReader::New();
vtkPolyData* old = bbGetOutputOut(); // old unused ? // JPR
bbSetOutputOut(informacion);
readed = true;
- }
+ } // if vtp
}
-
vtkActor *actor = (vtkActor*)bbGetOutputOutActor();
vtkPolyDataMapper *mapper = vtkPolyDataMapper::New();
-
//EED 2017-01-01 Migration VTK7
#if VTK_MAJOR_VERSION <= 5
mapper->SetInput(informacion);
#else
mapper->SetInputData(informacion);
#endif
-
actor->SetMapper(mapper);
bbSetOutputOutActor(actor);
-
if (bbGetInputInColor().size() >= 3)
{
actor->GetProperty()->SetColor(bbGetInputInColor()[0],bbGetInputInColor()[1],bbGetInputInColor()[2]);
- }
- else
- {
+ } else {
actor->GetProperty()->SetColor(1,1,1);
}
actor->GetProperty()->SetOpacity(bbGetInputInOpacity()/100);
-
//old->Delete();
-
InvokeEvent(OBS_POST_READER_1, informacion);
-
std::cout << "END [" << this << "]" << "PolyDataReaderPlus::Process()..." << std::endl;
-
}
+
void PolyDataReaderPlus::bbUserSetDefaultValues()
{
-
// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
// Here we initialize the input 'In' to 0
vtkPolyData* empty = vtkPolyData::New();
bbSetInputInPath(nada);
bbSetOutputOutActor(actor);
bbSetInputInOpacity(50);
-
readed = false;
-
}
+
void PolyDataReaderPlus::bbUserInitializeProcessing()
{
-
// THE INITIALIZATION METHOD BODY :
// Here does nothing
// but this is where you should allocate the internal/output pointers
// if any
-
-
}
+
void PolyDataReaderPlus::bbUserFinalizeProcessing()
{
-
// THE FINALIZATION METHOD BODY :
// Here does nothing
// but this is where you should desallocate the internal/output pointers
// if any
-
}
-}
-// EO namespace bbvtk
+}// EO namespace bbvtk