Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F424
OnlyPointSet.patch
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
•
schwarzt
Jan 20 2010, 4:03 PM
2010-01-20 16:03:18 (UTC+1)
Size
1 KB
Referenced Files
None
Subscribers
None
OnlyPointSet.patch
View Options
Index: mitkPointSet.cpp
===================================================================
--- mitkPointSet.cpp (revision 21075)
+++ mitkPointSet.cpp (working copy)
@@ -648,6 +648,10 @@
itkExceptionMacro(<<"timeGeometry->GetTimeSteps() != m_PointSetSeries.size() -- use Initialize(timeSteps) with correct number of timeSteps!");
}
+ // This is needed to detect zero objects
+ mitk::ScalarType nullpoint[]={0,0,0,0,0,0};
+ BoundingBox::BoundsArrayType itkBoundsNull(nullpoint);
+
//
// Iterate over the PointSets and update the Geometry
// information of each of the items.
@@ -658,6 +662,13 @@
{
const DataType::BoundingBoxType *bb = m_PointSetSeries[i]->GetBoundingBox();
BoundingBox::BoundsArrayType itkBounds = bb->GetBounds();
+
+ if ( m_PointSetSeries[i].IsNull() || (m_PointSetSeries[i]->GetNumberOfPoints() == 0)
+ || (itkBounds == itkBoundsNull) )
+ {
+ itkBounds = itkBoundsNull;
+ continue;
+ }
// Ensure minimal bounds of 1.0 in each dimension
for ( unsigned int j = 0; j < 3; ++j )
File Metadata
Details
Attached
Mime Type
text/plain
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
408
Default Alt Text
OnlyPointSet.patch (1 KB)
Attached To
Mode
T3209: BugFix: When the input mitk::PointSet has no points, the computation of the bounding box is taking the 0,0,0 point
Attached
Detach File
Event Timeline
•
schwarzt
added a comment.
Jan 20 2010, 4:03 PM
2010-01-20 16:03:18 (UTC+1)
Comment Actions
Patch for PointSet only
Log In to Comment