Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
vtkClosedSurfaceToFractionalLabelmapConversionRule.h
Go to the documentation of this file.
1/*==============================================================================
2
3 Copyright (c) Laboratory for Percutaneous Surgery (PerkLab)
4 Queen's University, Kingston, ON, Canada. All Rights Reserved.
5
6 See COPYRIGHT.txt
7 or http://www.slicer.org/copyright/copyright.txt for details.
8
9 Unless required by applicable law or agreed to in writing, software
10 distributed under the License is distributed on an "AS IS" BASIS,
11 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 See the License for the specific language governing permissions and
13 limitations under the License.
14
15 This file was originally developed by Kyle Sunderland, PerkLab, Queen's University
16 and was supported through the Applied Cancer Research Unit program of Cancer Care
17 Ontario with funds provided by the Ontario Ministry of Health and Long-Term Care
18
19==============================================================================*/
20
21#ifndef __vtkClosedSurfaceToFractionalLabelmapConversionRule_h
22#define __vtkClosedSurfaceToFractionalLabelmapConversionRule_h
23
24// SegmentationCore includes
27#include <vtkSegmentationCoreConfigure.h>
29
30// DicomRtImportExport includes
31#include "vtkSegmentationCoreConfigure.h"
32
33// VTK includes
34#include <vtkPolyDataToImageStencil.h>
35
36class vtkPolyData;
37
43{
44
45public:
49
53 vtkDataObject* ConstructRepresentationObjectByRepresentation(std::string representationName) override;
54
58 vtkDataObject* ConstructRepresentationObjectByClass(std::string className) override;
59
61 bool Convert(vtkSegment* segment) override;
62
64 bool PostConvert(vtkSegmentation* vtkNotUsed(segmentation)) override { return true; };
65
67 unsigned int GetConversionCost(vtkDataObject* sourceRepresentation=nullptr, vtkDataObject* targetRepresentation=nullptr) override;
68
70 const char* GetName() override { return "Closed surface to fractional labelmap (simple image stencil)"; };
71
74
77
78protected:
79 // Oversampling factor that will be used to calculate the size of the binary labelmap
81
82protected:
83
86
87private:
89 void operator=(const vtkClosedSurfaceToFractionalLabelmapConversionRule&) = delete;
90};
91
92#endif
const char * GetTargetRepresentationName() override
Human-readable name of the target representation.
const char * GetName() override
Human-readable name of the converter rule.
static vtkClosedSurfaceToFractionalLabelmapConversionRule * New()
vtkDataObject * ConstructRepresentationObjectByClass(std::string className) override
vtkSegmentationConverterRule * CreateRuleInstance() override
bool PostConvert(vtkSegmentation *vtkNotUsed(segmentation)) override
Overridden to prevent vtkClosedSurfaceToBinaryLabelmapConversionRule::PostConvert.
bool Convert(vtkSegment *segment) override
Update the target representation based on the source representation.
unsigned int GetConversionCost(vtkDataObject *sourceRepresentation=nullptr, vtkDataObject *targetRepresentation=nullptr) override
Get the cost of the conversion.
const char * GetSourceRepresentationName() override
Human-readable name of the source representation.
vtkDataObject * ConstructRepresentationObjectByRepresentation(std::string representationName) override
This class encapsulates a segment that is part of a segmentation.
Definition vtkSegment.h:45
static const char * GetSegmentationFractionalLabelmapRepresentationName()
static const char * GetSegmentationClosedSurfaceRepresentationName()
This class encapsulates a segmentation that can contain multiple segments and multiple representation...