Hi all,<br><br>I am currently using a PathIterator to try to move through some pixels between two indices. My iterator moves successfully most of the way and then decides to calculate a very small step size, so small that it becomes #DEN when I look at it with the debugger.<br>
Here is the relevant code:<br><br><br> ImageType::IndexType node1 = cell->critical_points_queue[node_from];<br> ImageType::IndexType node2 = cell->critical_points_queue[node_to];<br><br> typedef itk::PolyLineParametricPath< 3 > PathType;<br>
PathType::Pointer path = PathType::New();<br> path->Initialize();<br><br> std::cout << "Start Index: " << start_index << " " << "End Index: " << end_index << std::endl;<br>
<br> path->AddVertex(node1);<br> path->AddVertex(node2);<br><br> typedef itk::PathConstIterator< VesselnessImageType, PathType > PathIteratorType;<br> PathIteratorType path_iter(cell->vesselness_image, path);<br>
<br> double sum_of_vesselness_values = 0;<br> itk::uint64_t path_length = 0;<br> path_iter.GoToBegin();<br> while (!path_iter.IsAtEnd())<br> {<br> std::cout << "Path iterator position: " << path_iter.GetPathPosition() << std::endl;<br>
std::cout << "Path iterator index: " << path_iter.GetIndex() << std::endl;<br> sum_of_vesselness_values += path_iter.Get();<br> ++path_iter;<br> }<br><br><br>And here is the relevant output:<br>
<br>Start Index: [100, 81, 17] End Index: [114, 81, 17]<br>Path iterator position: 0<br>Path iterator index: [100, 81, 17]<br>Path iterator position: 0.0888889<br>Path iterator index: [101, 81, 17]<br>Path iterator position: 0.177778<br>
Path iterator index: [102, 81, 17]<br>Path iterator position: 0.237037<br>Path iterator index: [103, 81, 17]<br>Path iterator position: 0.296296<br>Path iterator index: [104, 81, 17]<br>Path iterator position: 0.385185<br>
Path iterator index: [105, 81, 17]<br>Path iterator position: 0.444444<br>Path iterator index: [106, 81, 17]<br>Path iterator position: 0.533333<br>Path iterator index: [107, 81, 17]<br>Path iterator position: 0.592593<br>
Path iterator index: [108, 81, 17]<br>Path iterator position: 0.651852<br>Path iterator index: [109, 81, 17]<br>Path iterator position: 0.740741<br>Path iterator index: [110, 81, 17]<br>Path iterator position: 0.8<br>Path iterator index: [111, 81, 17]<br>
<Crash><br><br>Thanks,<br><br clear="all">Ho Cheung<br>Research Assistant<br>Bio-Image Analytics Lab - University of Houston<br><a href="mailto:hocheung20@gmail.com" target="_blank">hocheung20@gmail.com</a><br>Cell: (832) 215-6347<br>