+ /*
+
+ this->m_Axes = vtkSmartPointer< vtkPolyData >::New( );
+ vtkSmartPointer< vtkPoints > points =
+ vtkSmartPointer< vtkPoints >::New( );
+ vtkSmartPointer< vtkCellArray > lines =
+ vtkSmartPointer< vtkCellArray >::New( );
+
+ {
+
+ leo++;
+ std::cout << "Leaf: " << leo << " " << cIt->first << " " << vIt << std::endl;
+ bool start = true;
+ do
+ {
+ double dist = double( input->GetPixel( vIt ) );
+ TImage::SizeType radius;
+ for( unsigned int d = 0; d < TImage::ImageDimension; ++d )
+ radius[ d ] =
+ ( unsigned long )( dist / spacing[ d ] ) + 1;
+ itk::NeighborhoodIterator< _TMarkImage > mIt(
+ radius, marks, marks->GetRequestedRegion( )
+ );
+ mIt.GoToBegin( );
+ mIt.SetLocation( vIt );
+
+ TImage::SizeType size = mIt.GetSize( );
+ unsigned int nN = 1;
+ for( unsigned int d = 0; d < TImage::ImageDimension; ++d )
+ nN *= size[ d ];
+ for( unsigned int i = 0; i < nN; ++i )
+ if( marks->GetRequestedRegion( ).IsInside( mIt.GetIndex( i ) ) )
+ mIt.SetPixel( i, ( start )? 255: 100 );
+
+ start = false;
+
+ // Next vertex
+ vIt = this->_Parent( vIt );
+
+ } while( vIt != this->_Parent( vIt ) );
+
+ // Last vertex
+ // std::cout << vIt << " " << this->GetSeed( 0 ) << std::endl;
+ */
+ /* TODO
+ TVertices pS;
+ TVertex parent = this->_Parent( vIt );
+ while( parent != vIt )
+ {
+ pS.push_front( vIt );
+ vIt = parent;
+ parent = this->_Parent( vIt );
+
+ TImage::PointType pnt;
+ this->GetInput( )->TransformIndexToPhysicalPoint( vIt, pnt );
+ points->InsertNextPoint( pnt[ 0 ], pnt[ 1 ], pnt[ 2 ] );
+ if( points->GetNumberOfPoints( ) > 1 )
+ {
+ lines->InsertNextCell( 2 );
+ lines->InsertCellPoint( points->GetNumberOfPoints( ) - 2 );
+ lines->InsertCellPoint( points->GetNumberOfPoints( ) - 1 );
+
+ } // fi
+
+ } // elihw
+ pS.push_front( vIt );
+ TImage::PointType pnt;
+ this->GetInput( )->TransformIndexToPhysicalPoint( vIt, pnt );
+ points->InsertNextPoint( pnt[ 0 ], pnt[ 1 ], pnt[ 2 ] );
+ if( points->GetNumberOfPoints( ) > 1 )
+ {
+ lines->InsertNextCell( 2 );
+ lines->InsertCellPoint( points->GetNumberOfPoints( ) - 2 );
+ lines->InsertCellPoint( points->GetNumberOfPoints( ) - 1 );
+
+ } // fi
+
+ this->m_Axes->SetPoints( points );
+ this->m_Axes->SetLines( lines );
+ */
+
+ /*
+ } // rof
+ */