vix raytracer representation
This commit is contained in:
@@ -63,9 +63,16 @@ public:
|
||||
|
||||
inline size_t Count() const { return this->m_Count; }
|
||||
|
||||
inline size_t size() const { return this->m_Count; }
|
||||
|
||||
inline const Scalarf &TotalLength() const { return this->m_TotalLength; }
|
||||
|
||||
inline void SetCount(size_t c) { this->m_Count = c; }
|
||||
inline void SetCount(size_t c) {
|
||||
this->m_Count = c;
|
||||
if (this->m_Data.size() != c) {
|
||||
this->m_Data.resize(c);
|
||||
}
|
||||
}
|
||||
|
||||
inline void SetTotalLength(Scalarf tl) { this->m_TotalLength = tl; }
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ public:
|
||||
if (annotation) {
|
||||
sprintf(str, "total length = %f", vtk_raytr->GetRay().TotalLength());
|
||||
annotation->SetText(1, str);
|
||||
for (int i = 0; i < vtk_raytr->GetRay().Data().size(); ++i) {
|
||||
for (int i = 0; i < vtk_raytr->GetRay().size(); ++i) {
|
||||
std::cout << "L[" << i << "] = " << vtk_raytr->GetRay().Data().at(i).L
|
||||
<< "\n";
|
||||
}
|
||||
|
||||
@@ -249,13 +249,14 @@ void vtkVoxRaytracerRepresentation::SetRay(VoxRaytracer::RayData *ray) {
|
||||
Vector3i idv = m_Content->GetImage()->UnMap(id);
|
||||
vtkSmartPointer<vtkCubeSource> cube = vtkSmartPointer<vtkCubeSource>::New();
|
||||
cube->SetBounds(idv(0), idv(0) + 1, idv(1), idv(1) + 1, idv(2), idv(2) + 1);
|
||||
#if VTK_MAJOR_VERSION <= 5
|
||||
cube->Update();
|
||||
#if VTK_MAJOR_VERSION <= 5
|
||||
appender->AddInput(cube->GetOutput());
|
||||
#else
|
||||
appender->AddInputData(cube->GetOutput());
|
||||
#endif
|
||||
}
|
||||
appender->Modified();
|
||||
}
|
||||
|
||||
void vtkVoxRaytracerRepresentation::SetVoxelsColor(Vector4f rgba) {
|
||||
|
||||
Reference in New Issue
Block a user