26 #ifndef __vtkSlicerSegmentationsModuleLogic_h 27 #define __vtkSlicerSegmentationsModuleLogic_h 31 #include "vtkSlicerSegmentationsModuleLogicExport.h" 36 class vtkCallbackCommand;
40 class vtkGeneralTransform;
57 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
96 vtkMRMLVolumeNode* volumeNode,
bool shallowCopy =
true,
bool shiftImageDataExtentToZeroStart =
true);
108 static void GetAllLabelValues(vtkIntArray* labels, vtkImageData* labelmap);
136 static vtkSegment* GetSegmentForSegmentSubjectHierarchyItem(vtkIdType segmentShItemID,
vtkMRMLScene* scene);
174 static bool ExportSegmentsToLabelmapNode(
vtkMRMLSegmentationNode* segmentationNode, std::vector<std::string>& segmentIDs,
182 static bool ExportSegmentsToLabelmapNode(
vtkMRMLSegmentationNode* segmentationNode, vtkStringArray* segmentIDs,
210 vtkMRMLSegmentationNode* segmentationNode, std::string baseSegmentName=
"", std::string insertBeforeSegmentId=
"") ;
221 vtkGeneralTransform* labelmapToSegmentationTransform=NULL );
228 vtkMRMLSegmentationNode* segmentationNode, std::string terminologyContextName, std::string insertBeforeSegmentId=
"");
234 static bool ImportModelHierarchyToSegmentationNode(
244 static bool ExportSegmentsClosedSurfaceRepresentationToFiles(std::string destinationFolder,
246 std::string fileFormat =
"STL",
bool lps =
true,
double sizeScale = 1.0,
bool merge =
false);
253 static vtkDataObject* CreateRepresentationForOneSegment(
vtkSegmentation* segmentation, std::string segmentID, std::string representationName);
258 static bool ApplyParentTransformToOrientedImageData(
275 static bool GetTransformBetweenRepresentationAndSegmentation(
287 static bool GetSegmentRepresentation(
vtkMRMLSegmentationNode* segmentationNode, std::string segmentID, std::string representationName, vtkDataObject* segmentRepresentation,
bool applyParentTransform=
true);
311 std::string segmentID, vtkPolyData* polyData,
bool applyParentTransform =
true);
337 bool GetDefaultSurfaceSmoothingEnabled();
338 void SetDefaultSurfaceSmoothingEnabled(
bool enabled);
355 static
void OnSubjectHierarchyUIDAdded(vtkObject* caller,
unsigned long eid,
void* clientData,
void* callData);
358 virtual
void OnMRMLSceneNodeAdded(
vtkMRMLNode* node) VTK_OVERRIDE;
360 static
bool ExportSegmentsClosedSurfaceRepresentationToStlFiles(
std::
string destinationFolder,
362 static
bool ExportSegmentsClosedSurfaceRepresentationToObjFile(
std::
string destinationFolder,
368 static
std::
string GetSafeFileName(
std::
string originalName);
375 vtkCallbackCommand* SubjectHierarchyUIDCallbackCommand;
static vtkSlicerModuleLogic * New()
The Usual vtk class functions.
This class encapsulates a segment that is part of a segmentation.
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
MRML node to represent a 3D surface model.
MRML node for representing a label map volume.
MRML node for segmentation storage on disk.
Image data containing orientation information.
A set of MRML Nodes that supports serialization and undo/redo.
virtual void RegisterNodes()
This class encapsulates a segmentation that can contain multiple segments and multiple representation...
virtual void SetMRMLSceneInternal(vtkMRMLScene *newScene)
MRML node to represent a hierarchyu of models.
MRML node for representing a volume (image stack).
MRML node for representing a volume (image stack).
Abstract Superclass for all specific types of MRML nodes.
MRML node containing segmentationsSegmentation node stores a set of segments (also known as contours ...