Hi Matthias, You should be able to use mitk::Image instead of itk::ImageSpatialObject. Each MITK data object (derived from mitk::BaseData) has a Geometry3D property (call ->GetGeometry()). This geometry describes the position and orientation of the object in a world coordinate system, similar to ITK spatial objects. There even is a MITK-IGT filter that will set the position and orientation of any data object to the values of a NavigationData: mitk::NavigationDataObjectVisualizationFilter (<http://docs.mitk.org/nightly-qt4/classmitk_1_1NavigationDataObjectVisualizationFilter.html>).
But as far as I know, there is no ready-to-use method to combine multiple arbitrarily oriented images into one overall-volume. You would have to develop that yourself. But for testing, using the above IGT filter and turning on volume rendering on all image slices should give you some visible result. Best regards, Jochen > -----Ursprüngliche Nachricht----- > Von: Matthias Mucha [mailto:[email protected]] > Gesendet: Mittwoch, 12. Mai 2010 20:24 > An: [email protected] > Betreff: [mitk-users] Use Image-Spatial-Objects > > Dear list, > > Recently I struggled by importing an ITK-ImageSpatial-Object to render > it in MITK. In ITK I use the itk::ImageSpatialObject to apply tracking- > coordinates (translation and rotation) to slices. Than I want to > display the slices as a 3D-Volume by using an interpolation-method > (i.E. a LinearInterpolator). But I have no idea how to import > itk::ImageSpatialObjects in MITK. Can I do the hole process in MITK > directly? > Here is my code for the ImageSpatialObject: > > VolumeSpatialObjectType::Pointer imageSO = > VolumeSpatialObjectType::New(); //Spatial-Slice > VolumeSpatialObjectType::Pointer volumeSO = > VolumeSpatialObjectType::New(); //Spatial-Volume > > //Set spacing > const double[3] spacing; > spacing[0] = 1; > spacing[1] = 1; > spacing[2] = 1; > volumeSO->SetSpacing(spacing); > > queueMutex.Lock(); > //Get the Image-Queue (std::deque) > m_ImageStack = m_QueueManager->GetImageQueue(); > > // Get the Tracking-Data-Queue (std::deque) > m_TrackingDataStack = m_QueueManager->GetTrackingQueue(); > queueMutex.Unlock(); > > //iterate through the queue and stack the images to a 3D- > Volume > // VolumeType is defined as itk::image<unsigned char, 3> > > deque<VolumeType::Pointer>::iterator queueIter = > m_ImageStack.begin(); > deque<mitk::NavigationData::Pointer>::iterator trackingIter > = m_TrackingDataStack.begin(); > > for(; queueIter != m_ImageStack.end(); ++queueIter, > ++trackingIter){ > > //Set Spatial-Object-Offset > imageSO->SetImage(*queueIter); //Set slice > > volumeSO->AddSpatialObject(imageSO); //add a slice to the volume > > //Set the offset for the current slice > TransformType::OffsetType translationSO; > trackingData = *trackingIter; > translationSO[0] = m_TrackedData->GetPosition()[0]; > translationSO[1] = m_TrackedData->GetPosition()[1]; > translationSO[2] = m_TrackedData->GetPosition()[2]; > imageSO->GetIndexToObjectTransform()- > >SetOffset(translationSO); > imageSO->ObjectToParentTransform(); > > } > > //ImageSpatialObject-Volume with transformed slices > volumeSO->ComputeObjectToWorldTransform(); > > Regards! > > Matthias Mucha > > -- > GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT! > Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01 > > ----------------------------------------------------------------------- > ------- > > _______________________________________________ > mitk-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/mitk-users ------------------------------------------------------------------------------ _______________________________________________ mitk-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mitk-users
