17 #ifndef mitkConnectomicsNetworkCreator_h
18 #define mitkConnectomicsNetworkCreator_h
20 #include <itkObject.h>
21 #include <itkObjectFactory.h>
30 #include <MitkConnectomicsExports.h>
60 itkFactorylessNewMacro(Self)
84 void CreateNetworkFromFibersAndSegmentation();
91 itkSetMacro(EndPointSearchRadius,
double);
92 itkSetMacro(ZeroLabelInvalid,
bool);
100 void CalculateCenterOfMass();
107 ~ConnectomicsNetworkCreator();
110 void AddConnectionToNetwork(ConnectionType newConnection);
113 VertexType ReturnAssociatedVertexForLabel( ImageLabelType label );
116 ConnectionType ReturnAssociatedVertexPairForLabelPair( ImageLabelPairType labelpair );
119 ImageLabelPairType ReturnLabelForFiberTract( TractType::
Pointer singleTract, MappingStrategy strategy );
122 void SupplyVertexWithInformation( ImageLabelType& label, VertexType& vertex );
125 std::
string LabelToString( ImageLabelType& label );
128 bool IsNonWhiteMatterLabel(
int labelInQuestion );
131 bool IsBackgroundLabel(
int labelInQuestion );
137 void LinearExtensionUntilGreyMatter(
std::vector<
int> & indexVectorOfPointsToUse, TractType::
Pointer singleTract,
138 int & label,
itk::Index<3> & mitkIndex );
143 void RetractionUntilBrainMatter(
bool retractFront, TractType::
Pointer singleTract,
144 int & label,
itk::Index<3> & mitkIndex );
149 std::vector<
double > GetCenterOfMass(
int label );
152 itk::
Point<
float, 3> GetItkPoint(
double point[3]);
159 void CreateNewNode(
int label,
itk::Index<3>,
bool useIndex );
167 ImageLabelPairType EndElementPositionLabel( TractType::
Pointer singleTract );
173 ImageLabelPairType PrecomputeVertexLocationsBySegmentation( TractType::
Pointer singleTract );
178 ImageLabelPairType JustEndPointVerticesNoLabelTest( TractType::
Pointer singleTract );
185 ImageLabelPairType EndElementPositionLabelAvoidingWhiteMatter( TractType::
Pointer singleTract );
205 std::
map< ImageLabelType, VertexType > m_LabelToVertexMap;
208 std::
map< ImageLabelType, NetworkNode > m_LabelToNodePropertyMap;
214 bool m_UseCoMCoordinates;
217 std::
map<
int,
std::vector<
double> > m_LabelsToCoordinatesMap;
220 MappingStrategy m_MappingStrategy;
223 double m_EndPointSearchRadius;
226 bool m_ZeroLabelInvalid;
230 bool m_AbortConnection;
236 static const
int freesurfer_Left_Cerebral_White_Matter = 2;
237 static const
int freesurfer_Left_Cerebellum_White_Matter = 7;
238 static const
int freesurfer_Left_Cerebellum_Cortex = 8;
239 static const
int freesurfer_Brain_Stem = 16;
240 static const
int freesurfer_Right_Cerebral_White_Matter = 41;
241 static const
int freesurfer_Right_Cerebellum_White_Matter = 46;
242 static const
int freesurfer_Right_Cerebellum_Cortex = 47;
249 #endif // _mitkConnectomicsNetworkCreator_H_INCLUDED
itk::Image< int, 3 > ITKImageType
itk::VectorContainer< unsigned int, TractType::Pointer > TractContainerType
mitk::ConnectomicsNetwork::EdgeDescriptorType EdgeType
std::pair< ImageLabelType, ImageLabelType > ImageLabelPairType
itk::VectorContainer< unsigned int, PointType > TractType
DataCollection - Class to facilitate loading/accessing structured data.
Creates connectomics networks from fibers and parcellation.
std::pair< VertexType, VertexType > ConnectionType
#define mitkClassMacroItkParent(className, SuperClassName)
Image class for storing images.
Base Class for Fiber Bundles;.
itk::Point< float, 3 > PointType
mitk::ConnectomicsNetwork::VertexDescriptorType VertexType
Connectomics Network Class.