@@ -298,71 +298,6 @@ class SlideViewer extends React.Component<SlideViewerProps, SlideViewerState> {
298298 return palette
299299 }
300300
301- shouldComponentUpdate (
302- nextProps : SlideViewerProps ,
303- nextState : SlideViewerState
304- ) : boolean {
305- // Only re-render if relevant props or state changed
306- // Skip re-render for frequent state updates that don't affect UI
307- if (
308- this . props . location . pathname !== nextProps . location . pathname ||
309- this . props . studyInstanceUID !== nextProps . studyInstanceUID ||
310- this . props . seriesInstanceUID !== nextProps . seriesInstanceUID ||
311- this . props . slide !== nextProps . slide ||
312- this . props . clients !== nextProps . clients ||
313- this . state . isLoading !== nextState . isLoading ||
314- this . state . isAnnotationModalVisible !== nextState . isAnnotationModalVisible ||
315- this . state . isSelectedRoiModalVisible !== nextState . isSelectedRoiModalVisible ||
316- this . state . isReportModalVisible !== nextState . isReportModalVisible ||
317- this . state . isGoToModalVisible !== nextState . isGoToModalVisible ||
318- this . state . isHoveredRoiTooltipVisible !== nextState . isHoveredRoiTooltipVisible ||
319- this . state . hoveredRoiAttributes !== nextState . hoveredRoiAttributes ||
320- this . state . visibleRoiUIDs !== nextState . visibleRoiUIDs ||
321- this . state . visibleSegmentUIDs !== nextState . visibleSegmentUIDs ||
322- this . state . visibleMappingUIDs !== nextState . visibleMappingUIDs ||
323- this . state . visibleAnnotationGroupUIDs !== nextState . visibleAnnotationGroupUIDs ||
324- this . state . selectedRoiUIDs !== nextState . selectedRoiUIDs ||
325- this . state . selectedEvaluations !== nextState . selectedEvaluations ||
326- this . state . selectedRoi !== nextState . selectedRoi ||
327- this . state . selectedFinding !== nextState . selectedFinding ||
328- this . state . selectedGeometryType !== nextState . selectedGeometryType ||
329- this . state . selectedMarkup !== nextState . selectedMarkup ||
330- this . state . selectedPresentationStateUID !== nextState . selectedPresentationStateUID ||
331- this . state . areRoisHidden !== nextState . areRoisHidden ||
332- this . state . isICCProfilesEnabled !== nextState . isICCProfilesEnabled ||
333- this . state . isSegmentationInterpolationEnabled !== nextState . isSegmentationInterpolationEnabled ||
334- this . state . isParametricMapInterpolationEnabled !== nextState . isParametricMapInterpolationEnabled ||
335- this . state . isClusteringEnabled !== nextState . isClusteringEnabled ||
336- this . state . clusteringPixelSizeThreshold !== nextState . clusteringPixelSizeThreshold ||
337- this . state . isRoiDrawingActive !== nextState . isRoiDrawingActive ||
338- this . state . isRoiModificationActive !== nextState . isRoiModificationActive ||
339- this . state . isRoiTranslationActive !== nextState . isRoiTranslationActive ||
340- this . state . hoveredRoiTooltipX !== nextState . hoveredRoiTooltipX ||
341- this . state . hoveredRoiTooltipY !== nextState . hoveredRoiTooltipY ||
342- this . state . selectedXCoordinate !== nextState . selectedXCoordinate ||
343- this . state . selectedYCoordinate !== nextState . selectedYCoordinate ||
344- this . state . selectedMagnification !== nextState . selectedMagnification ||
345- this . state . isSelectedXCoordinateValid !== nextState . isSelectedXCoordinateValid ||
346- this . state . isSelectedYCoordinateValid !== nextState . isSelectedYCoordinateValid ||
347- this . state . isSelectedMagnificationValid !== nextState . isSelectedMagnificationValid ||
348- this . state . validXCoordinateRange !== nextState . validXCoordinateRange ||
349- this . state . validYCoordinateRange !== nextState . validYCoordinateRange ||
350- this . state . presentationStates !== nextState . presentationStates ||
351- this . state . visibleOpticalPathIdentifiers !== nextState . visibleOpticalPathIdentifiers ||
352- this . state . activeOpticalPathIdentifiers !== nextState . activeOpticalPathIdentifiers ||
353- this . state . selectedSeriesInstanceUID !== nextState . selectedSeriesInstanceUID ||
354- this . state . selectedSegmentationSeriesInstanceUID !== nextState . selectedSegmentationSeriesInstanceUID ||
355- this . state . customizedSegmentColors !== nextState . customizedSegmentColors ||
356- this . state . generatedReport !== nextState . generatedReport
357- ) {
358- return true
359- }
360-
361- // Don't re-render for loadingFrames changes (too frequent)
362- // Don't re-render for pixelDataStatistics changes (computed, not directly displayed)
363- return false
364- }
365-
366301 componentDidUpdate (
367302 previousProps : SlideViewerProps ,
368303 previousState : SlideViewerState
0 commit comments