Page MenuHomePhabricator

OnlyPointSet.patch

Authored By
schwarzt
Jan 20 2010, 4:03 PM
Size
1 KB
Referenced Files
None
Subscribers
None

OnlyPointSet.patch

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

Mime Type
text/plain
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
408
Default Alt Text
OnlyPointSet.patch (1 KB)

Event Timeline