diff --git a/Modules/DiffusionImaging/Algorithms/Connectomics/mitkConnectomicsHistogramBase.h b/Modules/DiffusionImaging/Algorithms/Connectomics/mitkConnectomicsHistogramBase.h index 1ee7cf294b..89aa6e8bb2 100644 --- a/Modules/DiffusionImaging/Algorithms/Connectomics/mitkConnectomicsHistogramBase.h +++ b/Modules/DiffusionImaging/Algorithms/Connectomics/mitkConnectomicsHistogramBase.h @@ -1,101 +1,102 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef _MITK_ConnectomicsHistogramBase_H #define _MITK_ConnectomicsHistogramBase_H #include "mitkSimpleHistogram.h" #include "mitkCommon.h" #include "mitkConnectomicsNetwork.h" namespace mitk { - //##Documentation - //## @brief Superclass for histograms working with connectomic networks + /** + * \brief Superclass for histograms working with connectomic networks + */ class ConnectomicsHistogramBase : public mitk::SimpleHistogram { public: ConnectomicsHistogramBase(); virtual ~ConnectomicsHistogramBase(); /** @brief Returns the minimal y=f(x) value of the histogram. */ virtual double GetYMin() const; /** @brief Returns the maximum y=f(x) value of the histogram. */ virtual double GetYMax() const; /** @brief Returns the minimal x value of the histogram. */ virtual double GetXMin() const; /** @brief Returns the maximum x value of the histogram. */ virtual double GetXMax() const; /** @brief Returns the range of the histogram. */ virtual int GetRange() const; /** @brief Update the Y maximum to the maximal value in the histogram */ virtual void UpdateYMax(); /** @brief Creates a new histogram from the source. */ virtual void ComputeFromBaseData( BaseData* source ); /** @brief Print values to console. */ virtual void PrintToConsole( ) const; /** @brief Returns whether the histogram can be considered valid. */ virtual bool IsValid() const; /** @brief Returns the subject of the histogram as a string. */ virtual std::string GetSubject() const; /** @brief Set the subject of the histogram as a string. */ virtual void SetSubject( std::string ); /** @brief Get bin height for the bin between start and end*/ virtual float GetRelativeBin( double start, double end ) const; /** @brief Get the double vector*/ virtual std::vector< double > GetHistogramVector(); protected: // Functions /** @brief Creates a new histogram from the network source. */ virtual void ComputeFromConnectomicsNetwork( ConnectomicsNetwork* source ) = 0; /** @brief Legacy method, do no use */ virtual double GetMin() const; /** @brief Legacy method, do no use */ virtual double GetMax() const; // Variables /** @brief Is this a valid histogram*/ bool m_Valid; /** @brief Which is the baseline value for the histogram /* /* This value should be zero for all network histograms */ int m_BaselineValue; /** @brief Which is the top value for the histogram */ int m_TopValue; /** @brief Which is the starting x value for the histogram */ int m_StartValue; /** @brief We expect not continuous but discrete histograms */ std::vector< double > m_HistogramVector; /** @brief Subject of the histogram as a string. */ std::string m_Subject; }; } #endif /* _MITK_ConnectomicsHistogramBase_H */ diff --git a/Modules/DiffusionImaging/Algorithms/Connectomics/mitkConnectomicsHistogramCache.h b/Modules/DiffusionImaging/Algorithms/Connectomics/mitkConnectomicsHistogramCache.h index 7c95837b21..2d1c351034 100644 --- a/Modules/DiffusionImaging/Algorithms/Connectomics/mitkConnectomicsHistogramCache.h +++ b/Modules/DiffusionImaging/Algorithms/Connectomics/mitkConnectomicsHistogramCache.h @@ -1,112 +1,113 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef MITKCONNECTOMICSHISTOGRAMCACHE_H #define MITKCONNECTOMICSHISTOGRAMCACHE_H #include "mitkSimpleHistogram.h" #include "mitkConnectomicsNetwork.h" #include #include #include #include "MitkDiffusionImagingExports.h" namespace mitk { - //##Documentation - //## @brief Provides a method to cache network histograms + /** + * @brief Provides a method to cache network histograms + */ class ConnectomicsHistogramsContainer { public: void ComputeFromBaseData(BaseData* baseData) { m_BetweennessHistogram.ComputeFromBaseData(baseData); m_DegreeHistogram.ComputeFromBaseData(baseData); m_ShortestPathHistogram.ComputeFromBaseData(baseData); } ConnectomicsBetweennessHistogram* GetBetweennessHistogram( ) { return &m_BetweennessHistogram; } ConnectomicsDegreeHistogram* GetDegreeHistogram( ) { return &m_DegreeHistogram; } ConnectomicsShortestPathHistogram* GetShortestPathHistogram( ) { return &m_ShortestPathHistogram; } ConnectomicsBetweennessHistogram m_BetweennessHistogram; ConnectomicsDegreeHistogram m_DegreeHistogram; ConnectomicsShortestPathHistogram m_ShortestPathHistogram; }; class MitkDiffusionImaging_EXPORT ConnectomicsHistogramCache : public SimpleHistogramCache { public: ConnectomicsHistogramCache(); ~ConnectomicsHistogramCache(); ConnectomicsHistogramsContainer *operator[]( ConnectomicsNetwork::Pointer sp_NetworkData); protected: // purposely not implemented SimpleHistogram *operator[](BaseData::Pointer sp_BaseData); }; class ConnectomicsHistogramsCacheElement : public ConnectomicsHistogramCache::Element { public: void ComputeFromBaseData(BaseData* baseData) { m_Container.ComputeFromBaseData(baseData); } ConnectomicsHistogramsContainer* GetHistograms() { return &m_Container; } ConnectomicsHistogramsContainer m_Container; private: ConnectomicsHistogramBase* GetHistogram() { return NULL; } }; } #endif // MITKCONNECTOMICSHISTOGRAMCACHE_H diff --git a/Modules/DiffusionImaging/Algorithms/Connectomics/mitkConnectomicsNetworkCreator.h b/Modules/DiffusionImaging/Algorithms/Connectomics/mitkConnectomicsNetworkCreator.h index 504fe4fd2f..10252fa636 100644 --- a/Modules/DiffusionImaging/Algorithms/Connectomics/mitkConnectomicsNetworkCreator.h +++ b/Modules/DiffusionImaging/Algorithms/Connectomics/mitkConnectomicsNetworkCreator.h @@ -1,193 +1,200 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef mitkConnectomicsNetworkCreator_h #define mitkConnectomicsNetworkCreator_h #include #include #include #include "mitkCommon.h" #include "mitkImage.h" #include "mitkFiberBundleX.h" #include "mitkConnectomicsNetwork.h" #include "MitkDiffusionImagingExports.h" namespace mitk { + /** + * \brief Creates connectomics networks from fibers and parcellation + * + * This class needs a parcellation image and a fiber image to be set. Then you can create + * a connectomics network from the two, using different strategies. + */ + class MitkDiffusionImaging_EXPORT ConnectomicsNetworkCreator : public itk::Object { public: /** Enum for different ways to create the mapping from fibers to network */ enum MappingStrategy { EndElementPosition, PrecomputeAndDistance, JustEndPointVerticesNoLabel, EndElementPositionAvoidingWhiteMatter }; /** Standard class typedefs. */ /** Method for creation through the object factory. */ mitkClassMacro(ConnectomicsNetworkCreator, itk::Object); itkNewMacro(Self); /** Types for the standardized Tract **/ typedef itk::Point PointType; typedef itk::VectorContainer TractType; typedef itk::VectorContainer< unsigned int, TractType::Pointer > TractContainerType; //init via smartpointer /** Types for Network **/ typedef mitk::ConnectomicsNetwork::VertexDescriptorType VertexType; typedef mitk::ConnectomicsNetwork::EdgeDescriptorType EdgeType; typedef mitk::ConnectomicsNetwork::NetworkNode NetworkNode; typedef std::pair< VertexType, VertexType > ConnectionType; /** Types for labels **/ typedef int ImageLabelType; typedef std::pair< ImageLabelType, ImageLabelType > ImageLabelPairType; /** Given a fiber bundle and a parcellation are set, this will create a network from both */ void CreateNetworkFromFibersAndSegmentation(); void SetFiberBundle(mitk::FiberBundleX::Pointer fiberBundle); void SetSegmentation(mitk::Image::Pointer segmentation); mitk::ConnectomicsNetwork::Pointer GetNetwork(); protected: //////////////////// Functions /////////////////////// ConnectomicsNetworkCreator(); ConnectomicsNetworkCreator( mitk::Image::Pointer segmentation, mitk::FiberBundleX::Pointer fiberBundle ); ~ConnectomicsNetworkCreator(); /** Add a connection to the network */ void AddConnectionToNetwork(ConnectionType newConnection); /** Determine if a label is already identified with a vertex, otherwise create a new one */ VertexType ReturnAssociatedVertexForLabel( ImageLabelType label ); /** Return the vertexes associated with a pair of labels */ ConnectionType ReturnAssociatedVertexPairForLabelPair( ImageLabelPairType labelpair ); /** Return the pair of labels which identify the areas connected by a single fiber */ ImageLabelPairType ReturnLabelForFiberTract( TractType::Pointer singleTract, MappingStrategy strategy ); /** Assign the additional information which should be part of the vertex */ void SupplyVertexWithInformation( ImageLabelType& label, VertexType& vertex ); /** Create a string from the label */ std::string LabelToString( ImageLabelType& label ); /** Check whether the label in question belongs to white matter according to the freesurfer table */ bool IsNonWhiteMatterLabel( int labelInQuestion ); /** Check whether the label in question belongs to background according to the freesurfer table */ bool IsBackgroundLabel( int labelInQuestion ); /** Extend a straight line through the given points and look for the first non white matter label It will try extend in the direction of the points in the vector so a vector {B,C} will result in extending from C in the direction C-B */ void LinearExtensionUntilGreyMatter( std::vector & indexVectorOfPointsToUse, TractType::Pointer singleTract, int & label, mitk::Index3D & mitkIndex ); /** Retract fiber until the first brain matter label is hit The bool parameter controls whether the front or the end is retracted */ void RetractionUntilBrainMatter( bool retractFront, TractType::Pointer singleTract, int & label, mitk::Index3D & mitkIndex ); /** Convert point to itk point */ itk::Point GetItkPoint(double point[3]); ///////// Mapping strategies ////////// /** Use the position of the end and starting element only to map to labels Map a fiber to a vertex by taking the value of the parcellation image at the same world coordinates as the last and first element of the tract.*/ ImageLabelPairType EndElementPositionLabel( TractType::Pointer singleTract ); /** Map by distance between elements and vertices depending on their volume First go through the parcellation and compute the coordinates of the future vertices. Assign a radius according on their volume. Then map an edge to a label by considering the nearest vertices and comparing the distance to them to their radii. */ ImageLabelPairType PrecomputeVertexLocationsBySegmentation( TractType::Pointer singleTract ); /** Use the position of the end and starting element only to map to labels Just take first and last position, no labelling, nothing */ ImageLabelPairType JustEndPointVerticesNoLabelTest( TractType::Pointer singleTract ); /** Use the position of the end and starting element unless it is in white matter, then search for nearby parcellation to map to labels Map a fiber to a vertex by taking the value of the parcellation image at the same world coordinates as the last and first element of the tract. If this happens to be white matter, then try to extend the fiber in a line and take the first non-white matter parcel, that is intersected. */ ImageLabelPairType EndElementPositionLabelAvoidingWhiteMatter( TractType::Pointer singleTract ); ///////// Conversions ////////// /** Convert fiber index to segmentation index coordinates */ void FiberToSegmentationCoords( mitk::Point3D& fiberCoord, mitk::Point3D& segCoord ); /** Convert segmentation index to fiber index coordinates */ void SegmentationToFiberCoords( mitk::Point3D& segCoord, mitk::Point3D& fiberCoord ); /////////////////////// Variables //////////////////////// mitk::FiberBundleX::Pointer m_FiberBundle; mitk::Image::Pointer m_Segmentation; // the graph itself mitk::ConnectomicsNetwork::Pointer m_ConNetwork; // the id counter int idCounter; // the map mapping labels to vertices std::map< ImageLabelType, VertexType > m_LabelToVertexMap; // mapping labels to additional information std::map< ImageLabelType, NetworkNode > m_LabelToNodePropertyMap; // toggles whether edges between a node and itself can exist bool allowLoops; //////////////////////// IDs //////////////////////////// // These IDs are the freesurfer ids used in parcellation static const int freesurfer_Left_Cerebral_White_Matter = 2; static const int freesurfer_Left_Cerebellum_White_Matter = 7; static const int freesurfer_Left_Cerebellum_Cortex = 8; static const int freesurfer_Brain_Stem = 16; static const int freesurfer_Right_Cerebral_White_Matter = 41; static const int freesurfer_Right_Cerebellum_White_Matter = 46; static const int freesurfer_Right_Cerebellum_Cortex = 47; }; }// end namespace mitk #endif // _mitkConnectomicsNetworkCreator_H_INCLUDED diff --git a/Modules/DiffusionImaging/IODataStructures/ConnectomicsNetwork/mitkConnectomicsNetwork.h b/Modules/DiffusionImaging/IODataStructures/ConnectomicsNetwork/mitkConnectomicsNetwork.h index c9425a50a8..72098bbd44 100644 --- a/Modules/DiffusionImaging/IODataStructures/ConnectomicsNetwork/mitkConnectomicsNetwork.h +++ b/Modules/DiffusionImaging/IODataStructures/ConnectomicsNetwork/mitkConnectomicsNetwork.h @@ -1,196 +1,215 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef _MITK_ConnectomicsNetwork_H #define _MITK_ConnectomicsNetwork_H #include "MitkDiffusionImagingExports.h" #include "mitkBaseData.h" #include namespace mitk { /** - * \brief Base Class for Connectomics Networks */ + * \brief Connectomics Network Class + * + * This class is designed to represent a connectomics network (brain network). It encapsulates a + * boost adjacency list and provides additional capabilities. The information contained in the nodes and edges is: + * + * Network Node: + *
    + *
  • int ID - The id of the node + *
  • string label - The label of the node, this can be any string, such as an anatomical label + *
  • vector coordinates - The coordinates the node should be displayed at + *
+ * + * Network Edge: + *
    + *
  • int sourceId - The Id of the source node + *
  • int targetId - The Id of the target node + *
  • int weight - Weight of the edge as int (used for counting fibers) + *
  • double edge_weight - Used for boost and algorithms, should be between 0 and 1 + *
+ */ class MitkDiffusionImaging_EXPORT ConnectomicsNetwork : public BaseData { public: /** Structs for the graph */ /** The Node */ struct NetworkNode { int id; std::string label; std::vector< float > coordinates; }; /** The Edge */ struct NetworkEdge { int sourceId; int targetId; int weight; // For now the number of times it was present double edge_weight; // For boost, currently set to 1 by default for unweighted calculations }; /** Typedefs **/ //typedef boost::adjacency_list< boost::listS, boost::listS, boost::undirectedS, NetworkNode, NetworkEdge > NetworkType; typedef boost::adjacency_list< boost::vecS, boost::vecS, boost::undirectedS, NetworkNode, NetworkEdge > NetworkType; typedef boost::graph_traits::vertex_descriptor VertexDescriptorType; typedef boost::graph_traits::edge_descriptor EdgeDescriptorType; // virtual methods that need to be implemented virtual void UpdateOutputInformation(); virtual void SetRequestedRegionToLargestPossibleRegion(); virtual bool RequestedRegionIsOutsideOfTheBufferedRegion(); virtual bool VerifyRequestedRegion(); virtual void SetRequestedRegion( itk::DataObject *data ); // Macros mitkClassMacro( ConnectomicsNetwork, BaseData ); itkNewMacro( Self ); ////////////////// Interface /////////////////// /** return whether an edge exists between the two given vertices */ bool EdgeExists( VertexDescriptorType vertexA, VertexDescriptorType vertexB ) const; /** increase the weight of an edge between the two given vertices */ void IncreaseEdgeWeight( VertexDescriptorType vertexA, VertexDescriptorType vertexB ); /** add an edge between two given vertices */ void AddEdge( VertexDescriptorType vertexA, VertexDescriptorType vertexB); /** add an edge between two given vertices ( with a specific weight ) */ void AddEdge( VertexDescriptorType vertexA, VertexDescriptorType vertexB, int sourceID, int targetID, int weight = 1 ); /** add a vertex with a specified id */ VertexDescriptorType AddVertex( int id); /** set the label of a vertex */ void SetLabel( VertexDescriptorType vertex, std::string inLabel ); /** set the coordinates of a vertex */ void SetCoordinates( VertexDescriptorType vertex, std::vector< float > inCoordinates ); /** clear the graph */ void clear(); /** return the node struct for a given node descriptor */ NetworkNode GetNode( VertexDescriptorType vertex ) const; /** return the edge struct for two given node descriptors */ NetworkEdge GetEdge( VertexDescriptorType vertexA, VertexDescriptorType vertexB ) const; /** get vector containing all the nodes of the network */ std::vector< NetworkNode > GetVectorOfAllNodes() const; /** get vector containing all the vertex descriptors of the network */ std::vector< VertexDescriptorType > GetVectorOfAllVertexDescriptors() const; /** get vector containing the descriptors of nodes adjacent to the vertex denoted by the given descriptor */ std::vector< VertexDescriptorType > GetVectorOfAdjacentNodes( VertexDescriptorType vertex ) const; /** get vector containing all the edges of the network and the connected nodes */ std::vector< std::pair< std::pair< NetworkNode, NetworkNode > , NetworkEdge > > GetVectorOfAllEdges() const; /** get overall number of vertices in the network */ int GetNumberOfVertices() const; /** get overall number of edges in the network */ int GetNumberOfEdges(); /** get number of vertices, that are connected to themselves */ int GetNumberOfSelfLoops(); /** get number of vertices, that are connected to themselves */ double GetAverageDegree(); /** get number of edges divided by number of possible edges */ double GetConnectionDensity(); /** Get the maximum weight of all edges */ int GetMaximumWeight() const; /** Get a vector in the format vector[ vertexID ] = degree */ std::vector< int > GetDegreeOfNodes( ) const; /** Get the maximum degree of all nodes */ int GetMaximumDegree() const; /** Get a vector in the format vector[ vertexID ] = clustering coefficient */ std::vector< double > GetLocalClusteringCoefficients( ); /** Get a vector in the format vector[ degree ] = average clustering coefficient */ std::vector< double > GetClusteringCoefficientsByDegree( ); /** Get the global clustering coefficient */ double GetGlobalClusteringCoefficient( ); /** Access boost graph directly */ NetworkType* GetBoostGraph(); /** Get the modified flag */ bool GetIsModified() const; /** Set the modified flag */ void SetIsModified( bool ); /** Update the bounds of the geometry to fit the network */ void UpdateBounds( ); /** Remove nodes not connected to any other node */ void PruneUnconnectedSingleNodes(); /** Remove edges below the specified weight * * targetWeight is the number of connecting fibers * * This will remove unconnected nodes after removal */ void PruneEdgesBelowWeight( int targetWeight ); protected: ConnectomicsNetwork(); virtual ~ConnectomicsNetwork(); /** This function will relabel all vertices and edges in a continuous manner * * Mainly important after removing vertices, to make sure that the ids run continuously from * 0 to number of vertices - 1 and edge target and source ids match the corresponding node. */ void UpdateIDs(); NetworkType m_Network; /// Flag which indicates whether the network has been modified since the last check /// /// mainly for rendering purposes bool m_IsModified; private: }; } // namespace mitk #endif /* _MITK_ConnectomicsNetwork_H */ diff --git a/Modules/DiffusionImaging/IODataStructures/ConnectomicsNetwork/mitkConnectomicsNetworkIOFactory.h b/Modules/DiffusionImaging/IODataStructures/ConnectomicsNetwork/mitkConnectomicsNetworkIOFactory.h index 33939a6899..60ea43ebea 100644 --- a/Modules/DiffusionImaging/IODataStructures/ConnectomicsNetwork/mitkConnectomicsNetworkIOFactory.h +++ b/Modules/DiffusionImaging/IODataStructures/ConnectomicsNetwork/mitkConnectomicsNetworkIOFactory.h @@ -1,72 +1,73 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef __MITK_CONNECTOMICS_NETWORK_IO_FACTORY_H_HEADER__ #define __MITK_CONNECTOMICS_NETWORK_IO_FACTORY_H_HEADER__ #ifdef _MSC_VER #pragma warning ( disable : 4786 ) #endif #include "itkObjectFactoryBase.h" #include "mitkBaseData.h" #include "MitkDiffusionImagingExports.h" namespace mitk { -//##Documentation -//## @brief Create instances of ConnectomicsNetwork objects using an object factory. -//## -//## @ingroup IO + /** + * \brief Create instances of ConnectomicsNetwork objects using an object factory. + * + * \ingroup IO + */ class MitkDiffusionImaging_EXPORT ConnectomicsNetworkIOFactory : public itk::ObjectFactoryBase { public: /** Standard class typedefs. */ typedef ConnectomicsNetworkIOFactory Self; typedef itk::ObjectFactoryBase Superclass; typedef itk::SmartPointer Pointer; typedef itk::SmartPointer ConstPointer; /** Class methods used to interface with the registered factories. */ virtual const char* GetITKSourceVersion(void) const; virtual const char* GetDescription(void) const; /** Method for class instantiation. */ itkFactorylessNewMacro(Self); static ConnectomicsNetworkIOFactory* FactoryNew() { return new ConnectomicsNetworkIOFactory;} /** Run-time type information (and related methods). */ itkTypeMacro(ConnectomicsNetworkIOFactory, ObjectFactoryBase); /** Register one factory of this type */ static void RegisterOneFactory(void) { ConnectomicsNetworkIOFactory::Pointer ConnectomicsNetworkIOFactory = ConnectomicsNetworkIOFactory::New(); ObjectFactoryBase::RegisterFactory(ConnectomicsNetworkIOFactory); } protected: ConnectomicsNetworkIOFactory(); ~ConnectomicsNetworkIOFactory(); private: ConnectomicsNetworkIOFactory(const Self&); //purposely not implemented void operator=(const Self&); //purposely not implemented }; } // end namespace mitk #endif // __MITK_CONNECTOMICS_NETWORK_IO_FACTORY_H_HEADER__ diff --git a/Modules/DiffusionImaging/IODataStructures/ConnectomicsNetwork/mitkConnectomicsNetworkSerializer.h b/Modules/DiffusionImaging/IODataStructures/ConnectomicsNetwork/mitkConnectomicsNetworkSerializer.h index 5f06d678e7..aa766ed86a 100644 --- a/Modules/DiffusionImaging/IODataStructures/ConnectomicsNetwork/mitkConnectomicsNetworkSerializer.h +++ b/Modules/DiffusionImaging/IODataStructures/ConnectomicsNetwork/mitkConnectomicsNetworkSerializer.h @@ -1,39 +1,39 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef mitkConnectomicsNetworkSerializer_h_included #define mitkConnectomicsNetworkSerializer_h_included #include "MitkDiffusionImagingExports.h" #include "mitkBaseDataSerializer.h" namespace mitk { /** - \brief Serializes mitk::Surface for mitk::SceneIO + \brief Serializes mitk::ConnectomicsNetwork for mitk::SceneIO */ class MitkDiffusionImaging_EXPORT ConnectomicsNetworkSerializer : public BaseDataSerializer { public: mitkClassMacro( ConnectomicsNetworkSerializer, BaseDataSerializer ); itkNewMacro(Self); virtual std::string Serialize(); protected: ConnectomicsNetworkSerializer(); virtual ~ConnectomicsNetworkSerializer(); }; } // namespace #endif diff --git a/Modules/DiffusionImaging/Rendering/mitkConnectomicsNetworkMapper3D.h b/Modules/DiffusionImaging/Rendering/mitkConnectomicsNetworkMapper3D.h index b80c2a1ed5..355586ea9e 100644 --- a/Modules/DiffusionImaging/Rendering/mitkConnectomicsNetworkMapper3D.h +++ b/Modules/DiffusionImaging/Rendering/mitkConnectomicsNetworkMapper3D.h @@ -1,106 +1,107 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef ConnectomicsNetworkMapper3D_H_HEADER_INCLUDED #define ConnectomicsNetworkMapper3D_H_HEADER_INCLUDED // VTK includes #include #include "vtkPropAssembly.h" // MITK includes // base class #include "mitkVtkMapper3D.h" // data type #include "mitkConnectomicsNetwork.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "MitkDiffusionImagingExports.h" namespace mitk { - //##Documentation - //## @brief Mapper for Networks - //## @ingroup Mapper -// template + /** + * \brief Mapper for Networks + * \ingroup Mapper + */ + class MitkDiffusionImaging_EXPORT ConnectomicsNetworkMapper3D : public VtkMapper3D { public: mitkClassMacro(ConnectomicsNetworkMapper3D, VtkMapper3D); itkNewMacro(Self); virtual vtkProp *GetVtkProp(mitk::BaseRenderer *renderer); //looks like deprecated.. should be replaced bz GetViewProp() static void SetDefaultProperties(DataNode* node, BaseRenderer* renderer = NULL, bool overwrite = false ); virtual void ApplyProperties(mitk::BaseRenderer* renderer); static void SetVtkMapperImmediateModeRendering(vtkMapper *mapper); virtual void GenerateDataForRenderer(mitk::BaseRenderer* renderer); virtual void GenerateData(); virtual const mitk::ConnectomicsNetwork* GetInput(); protected: ConnectomicsNetworkMapper3D(); virtual ~ConnectomicsNetworkMapper3D(); void UpdateVtkObjects(); vtkPropAssembly *m_NetworkAssembly; }; } // namespace mitk #endif /* ConnectomicsNetworkMapper3D_H_HEADER_INCLUDED */