Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F482
mitkPointSetWriter.patch
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
•
vongruen
Mar 10 2010, 4:53 PM
2010-03-10 16:53:10 (UTC+1)
Size
3 KB
Referenced Files
None
Subscribers
None
mitkPointSetWriter.patch
View Options
Index: mitkPointSetWriter.cpp
===================================================================
--- mitkPointSetWriter.cpp (revision 21656)
+++ mitkPointSetWriter.cpp (working copy)
@@ -32,10 +32,16 @@
const char* mitk::PointSetWriter::XML_POINT_SET = "point_set" ;
+const char* mitk::PointSetWriter::XML_TIME_SERIES = "time_series";
+
+const char* mitk::PointSetWriter::XML_TIME_SERIES_ID = "time_series_id";
+
const char* mitk::PointSetWriter::XML_POINT = "point" ;
const char* mitk::PointSetWriter::XML_ID = "id" ;
+const char* mitk::PointSetWriter::XML_SPEC = "specification" ;
+
const char* mitk::PointSetWriter::XML_X = "x" ;
const char* mitk::PointSetWriter::XML_Y = "y" ;
@@ -134,30 +140,46 @@
WriteStartElement( XML_POINT_SET, out );
mitk::PointSet::PointsContainer* pointsContainer = pointSet->GetPointSet()->GetPoints();
mitk::PointSet::PointsContainer::Iterator it;
- for ( it = pointsContainer->Begin(); it != pointsContainer->End(); ++it )
+
+ for(unsigned int i=0; i< pointSet->GetTimeSteps(); i++)
{
- WriteStartElement( XML_POINT, out );
+ WriteStartElement( XML_TIME_SERIES, out );
+
+ WriteStartElement( XML_TIME_SERIES_ID, out );
+ WriteCharacterData( ConvertToString( i ).c_str() , out );
+ WriteEndElement( XML_TIME_SERIES_ID, out, false );
- WriteStartElement( XML_ID, out );
- WriteCharacterData( ConvertToString( it->Index() ).c_str() , out );
- WriteEndElement( XML_ID, out, false );
+ for ( it = pointsContainer->Begin(); it != pointsContainer->End(); ++it )
+ {
+ WriteStartElement( XML_POINT, out );
- mitk::PointSet::PointType point = it->Value();
+ WriteStartElement( XML_ID, out );
+ WriteCharacterData( ConvertToString( it->Index() ).c_str() , out );
+ WriteEndElement( XML_ID, out, false );
- WriteStartElement( XML_X, out );
- WriteCharacterData( ConvertToString( point[ 0 ] ).c_str(), out );
- WriteEndElement( XML_X, out, false );
+ mitk::PointSet::PointType point = it->Value();
- WriteStartElement( XML_Y, out );
- WriteCharacterData( ConvertToString( point[ 1 ] ).c_str(), out );
- WriteEndElement( XML_Y, out, false );
+ /*WriteStartElement( XML_SPEC, out );
- WriteStartElement( XML_Z, out );
- WriteCharacterData( ConvertToString( point[ 2 ] ).c_str(), out );
- WriteEndElement( XML_Z, out, false );
+ WriteEndElement( XML_SPEC, out, false );*/
- WriteEndElement( XML_POINT, out );
+ WriteStartElement( XML_X, out );
+ WriteCharacterData( ConvertToString( point[ 0 ] ).c_str(), out );
+ WriteEndElement( XML_X, out, false );
+
+ WriteStartElement( XML_Y, out );
+ WriteCharacterData( ConvertToString( point[ 1 ] ).c_str(), out );
+ WriteEndElement( XML_Y, out, false );
+
+ WriteStartElement( XML_Z, out );
+ WriteCharacterData( ConvertToString( point[ 2 ] ).c_str(), out );
+ WriteEndElement( XML_Z, out, false );
+
+ WriteEndElement( XML_POINT, out );
+ }
+ WriteEndElement( XML_TIME_SERIES, out, false );
}
+
WriteEndElement( XML_POINT_SET, out );
}
File Metadata
Details
Attached
Mime Type
text/plain
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
462
Default Alt Text
mitkPointSetWriter.patch (3 KB)
Attached To
Mode
T3415: 4D PointSet Writer and Loader does ignore Point specification
Attached
Detach File
Event Timeline
•
vongruen
added a comment.
Mar 10 2010, 4:53 PM
2010-03-10 16:53:10 (UTC+1)
Comment Actions
changes in the MITK PointSetWriter
Log In to Comment